Board index » delphi » Closing MS-DOS window

Closing MS-DOS window

Hi all,

I have a question.

When I run MS-DOS program, it leaves a window behind it (with caption
Finished - program.exe). Then I have to close it manually. Is there a
way to close it via code. I am calling the program with ShellExecute(..)

Every reply would really be appreciated.

Tadej Krevh


Re:Closing MS-DOS window

There are at least 2 ways to do what you want. First, rather than calling
the DOS program directly, create a PIF file set to close the window on exit
that runs your DOS program. Second, there are some parameters that can be
passed to that will do the same thing. Unfortunately, I don't
know exactly what those are, but I do know that using the PIF file does

Other Threads