I have an installer that installs the application and launches it right after the installation is complete. This works correctly for me.
But now I want to stop this application while uninstalling the application, I do not want the user to be prompted to close the applications manually. This will work automatically.
I need to do this with a custom action, the WM_CLOSE message will not work in my approach (indeed, I tried a couple of times).
I thought it might not be that difficult, but I can't get it to work. What i have done so far:
I defined CustomAction:
<CustomAction Id="CloseTrayApp" ExeCommand="-exit" FileKey="TrayApp" Execute="immediate" Return="asyncNoWait" />
and called it liek as follows:
<InstallExecuteSequence> ... <Custom Action="CloseTrayApp" Before="InstallValidate" /> ... </InstallExecuteSequence>
But that does not work. I assume that I am planning my own action incorrectly, but I cannot figure out the right time for this.
Are there any suggestions regarding the time / place for a user action schedule? I'm completely not sure that
Before="InstallValidate"
- This is the right place for this.
source share