You are here

MyAppPortable.exe keeps executing ...

4 posts / 0 new
Last post
franz_post
Offline
Last seen: 7 years 2 days ago
Joined: 2007-05-11 16:27
MyAppPortable.exe keeps executing ...

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

m2
Offline
Last seen: 13 years 7 months ago
Joined: 2006-12-12 12:00
It is possible with the

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

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 5 days ago
Joined: 2006-01-06 21:27
Yep

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."

franz_post
Offline
Last seen: 7 years 2 days ago
Joined: 2007-05-11 16:27
Not really ...

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

Log in or register to post comments