1. Minimize CMD.EXE
- Posted by Mike W <MWisolmerski at mayors.com> Jan 21, 2004
- 499 views
Hi - Does anyone know if there is a way to use system_exec and not have the command window pop up? I need the return code from the called program, so I don't think I can use any shell code like WIN32Lib's shellExecuteEx. Thanks - Mike W.
2. Re: Minimize CMD.EXE
- Posted by "Juergen Luethje" <j.lue at gmx.de> Jan 21, 2004
- 483 views
Mike W wrote: > Does anyone know if there is a way to use system_exec and not have the > command window pop up? I need the return code from the called program, > so I don't think I can use any shell code like WIN32Lib's > shellExecuteEx. Since you mention Win32Lib, I assume you are writing a _Windows_ program, right? Hm... when I call system_exec() in a Windows program (see example below) using 'exw.exe', the command window does _not_ pop up. I use Win 98/1st ed. and Euphoria 2.4. -----------------------[ begin 'test.exw' ]----------------------- integer x x = system_exec("calc.exe", 2) -- calls the Windows calculator ------------------------[ end 'test.exw' ]------------------------ But when I use 'exwc.exe' (a console version of 'exw.exe') instead to run my program, then the command window pops up. Regards, Juergen -- /"\ ASCII ribbon campain | The difference between men and boys \ / against HTML in | is the price of their toys. X e-mail and news, | / \ and unneeded MIME | http://home.arcor.de/luethje/prog/
3. Re: Minimize CMD.EXE
- Posted by "Juergen Luethje" <j.lue at gmx.de> Jan 21, 2004
- 465 views
Mike W wrote: > Thank you Juergen, but I am running an MS-DOS program Ah, I see. Then you can't use Win32Lib at all. > to perform a > connection to our iSeries box to map network drives. You are correct > that the command window does not pop up when executing a Windows > application. Ideally I would like to run this command minimized. > > Thanks - > Mike W. I've got a solution, that works at least on Windows 98/1st ed. Assume you have a bound or translated/compiled DOS program, say "test.exe". When you first run this program, Windows normally automagically creates a file "test.pif" in the same folder. (In the following description, I try to translate the German names to English, because I don't know the exact English names of all that dialog window elements.) Right-click at "test.pif", and choose "Properties" from the context menu. Choose the "Program" tab, and select "Execute: minimized" from the appropriate drop down list. Make a tick at the checkbox "close on exit". That's it. When "test.pif" is in the same folder as "test.exe" (that's the case when Windows had created "test.pif" automagically), it doesn't matter whether you call "test.pif" or "test.exe", in order to run your program. When your program is neither bound nor translated/compiled, and you call it like: ex.exe test.ex, you have to choose the desired settings in the file "ex.pif". But this of course affects all other programs that are executed by "ex.exe", too. > Juergen Luethje wrote: >> >> >> Mike W wrote: >> >>> Does anyone know if there is a way to use system_exec and not have the >>> command window pop up? I need the return code from the called program, >>> so I don't think I can use any shell code like WIN32Lib's >>> shellExecuteEx. <snipped old text> HTH, Juergen -- /"\ ASCII ribbon campain | |\ _,,,---,,_ \ / against HTML in | /,`.-'`' -. ;-;;,_ X e-mail and news, | |,4- ) )-,_..;\ ( `'-' / \ and unneeded MIME | '---''(_/--' `-'\_)
4. Re: Minimize CMD.EXE
- Posted by "Juergen Luethje" <j.lue at gmx.de> Jan 23, 2004
- 453 views
Mike W wrote: > Thank you Juergen, but I could not get the PIF to work on XP pro(yes, > bleeding edge). But, I was able to get the command window to launch > first behind the primary one and that will do. Nice to read that. Anyway, here's some information about "Using PIF files" on Win XP: http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/winxppro/proddocs/windows_pif_create.asp <snipped old text> Regards, Juergen -- /"\ ASCII ribbon campain | This message has been ROT-13 encrypted \ / against HTML in | twice for higher security. X e-mail and news, | / \ and unneeded MIME | http://home.arcor.de/luethje/prog/