-
Launch for c program
I have a shortcut on my windows desktop which when I open and look at the properties it shows Target "C:\Program Files\NMT\nmt.exe" test.srl.
I am trying to write code that will launch the above target.
P.S the test.srl is important as my program modifies this script file prior to launch of the program to ge the program to behave in different ways.
Any help most appreciated
Forget to mention that when the target is launced i want the lauching program to continue to do other things. I think this means I want the target to launch as a seperate process. I have looked at the FAQ and cant make head nor tail can somebody give me a snippet to work with.
thx
-
system() would be an option: probably not the best since I don't fully understand what you want to do exactly. It would allow you to lauch an app, then, after the app was done, it would return control to your program.
-
CreateProcess function - you could specify the process to launch
"C:\Program Files\NMT\nmt.exe"
you can specify command line parameters for the process "test.srl"
you can specify working folder
the function will return immediatly as soon as process is creted providing you with the process handle you can use to check if the process is running, wait for process completion, retreive the proccess return code, or terminate process if it run too long...