I built a portable app based on launcher template from this forum, let's call it MyAppPortable.exe. Everything works fine, only problem is, that MyAppPortable.exe can not distinguish between MyApp.exe started under it's control resp. started outside of it's control, i.e. from host computer.
It keeps executing until the last instancy of MyApp.exe has been terminated, and this can be the one launched from the host computer.
In order to work propoerly, the launcher should integrate house-keepning of processes created by itself (could be a table with process ids maintained by the launcher) and terminate immediately after all processes created by itself have terminated.
Did somebody think already about such improvement of the launcher template? Is this at all possible with NSIS and existing plugins???
Franz
It is possible with the system plugin (and call to kernel32.dll's GetModuleFileNameW). But it's far from comfortable, maybe there's a better way.
"Those people who think they know everything are a great annoyance to those of us who do." Asimov
You need to use
ExecWait "$EXEDIR\App\myapp\myapp.exe"
instead of Exec and FindProcDLL.----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.
"If you're not part of the solution, you're part of the precipitate."
I tried this also, but it seams to cause the opposite problem:
When starting the first portable instancy with ExecWait and the subsequent ones (SecondaryLaunch = True) with Exec, MyAppPortable.exe terminates when the first instancy of MyApp.exe has terminated, does the clean-up etc. while those instancies created with SecondaryLaunch = True are still running!
Or did I get something wrong?
Franz Post