Replies: 1 comment
-
|
Off the top of my head, I thought the Windows Installer's use of the Restart Manager tackled this problem. Are you suppressing any of the restart functionality in your package? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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