..run exe from within another one..
BlitzMax Forums/BlitzMax Programming/..run exe from within another one..
| ||
..well.... how should i run external exe from Bmax application? I want to start Settings.exe, do game settings or what not in there, then when click run button, Settings.exe should be terminated and Game.exe started...how? |
| ||
Function system_(command:String) Which can be found in pub.stdc. |
| ||
Won't that wait for execution to complete before continuing? or can it fire and forget? |
| ||
..i dont know..thats why im asking..what I need is just setup.exe running main game after basic settings is done, so setup.exe should 'die and never come back' :) and game.exe should run... |
| ||
You could probably use TProcess in that case.. or maybe OpenUrl. Though I'm not sure what the blocking rules are for OpenUrl, it should just work. |
| ||
Import pub.freeprocess local cmd$="xxxxx.exe" local p:TProcess = createProcess(cmd) TProcess.ProcessList.Remove(p) This should work. But I'm not sure if it's safe. |
| ||
..hmm..this doesnt work..Game.exe im calling, appear in Task Manager, but i cant see program running on screen...hmm...anyone has some working example?? Ill appreciate that a lot.. |
| ||
Extern "Win32" Function WinExec (lpCmdLine:Byte Ptr, nCmdShow:Int) End Extern and then WinExec("game.exe",10) |
| ||
..thank you very much Zeke..it works like a charm.. |
| ||
if you want cross platform capability why not use openurl("game.exe") then and end command right after that... |