I got an installer which installs an application and starts this one right after the installation was finished. This works properly for me.
But now I want to stop that application while uninstalling the application, i don't want the user to be prompted to close applications manually. This shall work full automatic.
I ned to do this using a custom action, the WM_CLOSE message will not work in my approach (really, i tried it a couple of times).
I thought that this can't be that difficult, but I don't get it to work. What I did so far:
I defined a CustomAction:
<CustomAction Id="CloseTrayApp" ExeCommand="-exit" FileKey="TrayApp" Execute="immediate" Return="asyncNoWait" />
and called it liek this:
<InstallExecuteSequence>
...
<Custom Action="CloseTrayApp" Before="InstallValidate" />
...
</InstallExecuteSequence>
But this does not work. I guess that I'm sheduling my custom action wrong, but I can't figure out the correct time to do it.
Are there any suggestions regarding the time/place to shedule the custom action in? I'm quite unsure if
Before="InstallValidate"
is the right place to do it.