PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Executing another .exe

Hola,

I have searched through multiple engines but perhaps I didnt get the keywords right.

If I have say a file launcher.exe and in that dialog if a user clicks on icon1 the OS will execute the file program1.exe which is located in a different directory. How do I implement this? What is the command? I think I remember in the old basic days I tried "Run "blah.exe"" or something to that effect.

Does anyone here know? Or could point me in the right direction?

The program I'm using will be embedded visual c++ 3.0.

Thanks in advance.
ShellExecuteEx is the preferred method, as it can also launch programs associated with files (ie you can tell it to open "test.doc" and it will launch the program associated with that file type and pass it the appropriate parameters).

You can also use CreateProcess.

Dan East