Re: Minimize CMD.EXE

new topic     » goto parent     » topic index » view thread      » older message » newer message

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     |  '---''(_/--'  `-'\_)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu