Here is a program I just wrote for this purpose, but it is general enough to work for
any such situation where you'd want to launch an application with Smartlaunch that could result in various processes.
Usage:
LaunchAndWait.exe Program.exe [process1] [process2] [process3] …
where Program.exe is the program to launch and each process is a process name that LaunchAndWait won't exit until it
doesn't detect running for 5 seconds.
Example setup:
1) Place LaunchAndWait.exe in the CoD2 directory
In Smartlaunch server application profile for Call of Duty 2 - Multiplayer:
2) Set executable path: C:\Program Files\Activision\Call of Duty 2\LaunchAndWait.exe
3) Set arguments: cod2mp_s.exe cod2mp_s cod2sp_s
4) Set working directory: C:\Program Files\Activision\Call of Duty 2
Notice the process names are the exe's filenames without the .exe extension.
Now when the client launches CoD2 - Multiplayer it will actually be launching LaunchAndWait.exe, which will in turn
launch cod2mp_s.exe but stay open as long as cod2mp_s or cod2sp_s is running (with a 5 second hard-coded tolerance).
Smartlaunch will think Call of Duty is running for as long as LaunchAndWait doesn't exit.
getur einhver útskýrt fyrir mig hvernig að ég á að framkvæma þetta