Main > Software Forum

Start win programs: start /wait, CreateProcess()

<< < (2/2)

)p(:

--- Quote ---Hello,

This is mainly a question for other front-end coders, but Windows knowledgable people may be interested, too.
--- End quote ---

Dave Dribin:

--- Quote ---Before you find a real solution you could in the meantime just check the exe if it is win32 and then make a batchfile with the /wait option...it is what I did a while back when I also did use a batch file to quit the fe while running a game...
--- End quote ---

How can you detect a Win32 exe vs. a DOS exe?

-Dave

Dave Dribin:

--- Quote ---How can you detect a Win32 exe vs. a DOS exe?
--- End quote ---

Ok, to answer my own question.... You can detect a Windows file by trying to find the PE File Signature.

http://caolan.wvware.com/~caolan/publink/winresdump/winresdump/doc/pefile.html

I can use this to put "start /wait" in front of Windows executables only.  I haven't tried it yet, but I don't see why it wouldn't work.

-Dave

Navigation

[0] Message Index

[*] Previous page

Go to full version