We help IT Professionals succeed at work.

CreateProcess terminates immediately

Choklander
Choklander asked
on
For some reason on some applications CreateProcess exits immediately and on others it works without a problem. What could be the cause? In both situations there is no error.
Comment
Watch Question

Author

Commented:
The application I am trying to start is not console. It is a 3D game.

Author

Commented:
I tried to start it with ShellExecute - the same thing. No errors it just stops.

Author

Commented:
It runs now. The directories had white space in them. But apparently the name of the file can have white space in them.

Author

Commented:
No the white space does not matter.
For some reason if I start the game from the shortcut on the desktop in runs but if I try it with the exe file it does not.
jkr
Top Expert 2012

Commented:
Try to start the app using the Dependency Walker (www.dependencywalker.com) in "Profile Mode" and post the output.
Commented:

- you may ran the wrong exe file. for example, maybe the game has two exes one of them only can be executed on your machine.

- or maybe the shortcut sends some arguments to the exe to run.

** Right click the shortcut on the desktop and click "Properties" then check the "Target" of the shortcut.

Best wishes,
Ahmed.
if file name with white space is the issue, type in the 8 character dos name of the exe in the path. The 8 character dos name can be obtained by going to command prompt and running "dir" command with /x switch.