Issue with CloseApplications using WiX 5.0.2 #8869
Unanswered
radu-solomon
asked this question in
Questions
Replies: 1 comment 5 replies
-
I can at least answer this part. MSI installation is divided up into two parts:
Due to the above a lot of custom actions will come in pairs: one to collect data, etc, and one to actually execute the desired actions. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have an installer for our app that consists of a service and a TrayIcon. During Upgrades, we always get the error that the TrayIcon has files in use and needs to be killed, which fails.
I read that CloseApplications is intended for this kind of usage, closing TrayIcons and other apps, and tried to implement it.
The problem I am facing is I need this to run before RestarManger fires and prompts for it but no matter what I try it always errors out with
Error 2762: Unable to schedule operation. The action must be scheduled between InstallInitialize and InstallFinalize.
I read that setting RebootPrompt=no should fix this but no luck. No matter what values I set its always the same error.
If I move it after InstallInitialize it will be too late as the RM had already prompted for the kill so it defeats the point.
The code that I tried
<util:CloseApplication Id="CloseTrayIcon" Target="$(var.TrayIconFileId)" TerminateProcess="1" RebootPrompt="no" />
<Custom Action="override Wix4CloseApplications_$(sys.BUILDARCHSHORT)" After="InstallValidate"/>
What is see in the logs and confuses me is that it starts as Wix4CloseApplications_X64 and than part way through it switches to Wix4CloseApplicationsDeferred_X64 and that is when it fails
Is there any way to achieve this without getting the file in use prompt, and if yes, how? Or am I out of luck? And why does it switch to Wix4CloseApplicationsDeferred_X64 ?
Beta Was this translation helpful? Give feedback.
All reactions