You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I built an installer which installs and starts a service. Everything installs fine. When I attempt an uninstall and look in the log, the InstallValidate step reports files in use as they are still being used by the service when the uninstall is launched. This triggers the reboot popup. It seems InstallValidate occurs before InstallInitialize and since service manipulation requires elevated privileges, the service can't be stopped before InstallInitialize.
By the time the uninstall gets to the RemoveFiles step, the service has been stopped and deleted. I do not see any errors in the log during this step so I think the files were deleted successfully.
I know I can suppress the reboot prompt and hope that everything else is ok but that could hide other problems.
Is there a solution whereby the service is stopped and deleted before the validation of files occurs? It would appear that file validation needs to happen in the deferred stage (after InstallInitialize) and be scheduled after service stop and deletion.
Note: This also applies to the uninstall phase of a major upgrade which is more problematic as the user intends to continue using the product.
I tried the solution mentioned here (#4917) of having separate ServiceControl elements and reversing the order but that didn't work. I don't understand how it could if indeed the steps are ordered the way I see them.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I built an installer which installs and starts a service. Everything installs fine. When I attempt an uninstall and look in the log, the InstallValidate step reports files in use as they are still being used by the service when the uninstall is launched. This triggers the reboot popup. It seems InstallValidate occurs before InstallInitialize and since service manipulation requires elevated privileges, the service can't be stopped before InstallInitialize.
By the time the uninstall gets to the RemoveFiles step, the service has been stopped and deleted. I do not see any errors in the log during this step so I think the files were deleted successfully.
I know I can suppress the reboot prompt and hope that everything else is ok but that could hide other problems.
Is there a solution whereby the service is stopped and deleted before the validation of files occurs? It would appear that file validation needs to happen in the deferred stage (after InstallInitialize) and be scheduled after service stop and deletion.
Note: This also applies to the uninstall phase of a major upgrade which is more problematic as the user intends to continue using the product.
I tried the solution mentioned here (#4917) of having separate ServiceControl elements and reversing the order but that didn't work. I don't understand how it could if indeed the steps are ordered the way I see them.
Open Source Maintenance Fee
wixtoolsetproject because I support the maintainers.Beta Was this translation helpful? Give feedback.
All reactions