Run another .exe and end current

BlitzMax Forums/BlitzMax Beginners Area/Run another .exe and end current

How can I execute another .exe file from current application, then end the current application.

I've tried this:

proc = TProcess.Create("warning2.exe", 0)
end

But the "end" command seems to close the warning2.exe as well as the current application, I only want to end the current application and have warning2.exe run.

I think that the child process that was launched is attached to the parent!

You can probably wait for the child process to complete before ending the parent process?

Try OpenURL().

what about system_() (I didn't test it though)

what about system_() (I didn't test it though)

Unlike OpenURL(), system_() is blocking (the caling program will hang until the new process has terminated) and so isn't really inline with duquette's requirements.

I ran across this issue a long time ago. In the end I made a helper app that I spawn which loads the second app so that I can shut the first one down. There's probably a more sensible way to do it.