That is definitely silent and fast. In addition, console stuff can't happen. I had a pause command in my batch file and it did not happen. The rest of the batch file ran fine.
Another nice tool for the arsenal Dennis McGrath -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of MikeB Sent: Thursday, July 24, 2008 12:07 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Silent LAUNCH command. ----- Original Message ----- From: "Lawrence Lustig" <[EMAIL PROTECTED]> To: "RBASE-L Mailing List" <[email protected]> Sent: Thursday, July 24, 2008 9:39 AM Subject: [RBASE-L] - Silent LAUNCH command. >I have an R:Base program which builds a batch file to perform some system >level processing. I can LAUNCH the batch file, it works great. > > However, a DOS window flashes on the screen while the batch file operates. > There's no output, so there's no need for the window or the flashing. > > Can anyone think of a clever way to launch a batch file "invisibly"? > > Failing that, does anyone (paging MikeB, paging MikeB, Mr. B please pick up > the white courtesy phone) have the STDCALL worked out to do this directly > through ShellExecEx? > -- Anyway, if you're still interested: { HINSTANCE ShellExecute( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd ); Syntax located at: http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx } SET VAR nshowcmd INTEGER = 0 { SW_HIDE } SET VAR lpdirectory TEXT = NULL SET VAR lpparameters TEXT = NULL SET VAR lpfile TEXT = 'TestBat.bat' SET VAR lpoperation TEXT = 'open' SET VAR hwnd INTEGER = 0 { since it runs hidden, pass HWND as null } SET VAR vretval INTEGER = NULL IF (chkfunc('ShellExecuteA')) = 0 THEN STDCALL function 'ShellExecuteA' ALIAS 'ShellExecute' + (integer, ptr text (256), ptr text (128), ptr text (128), ptr text (32), integer) : integer ENDIF SET VAR vi = (dlcall('shell32.dll', 'ShellExecuteA', + nshowcmd, lpdirectory, lpparameters, lpfile, lpoperation, hwnd)) RETURN > Larry

