[wix-users] Major Upgrade Service Installer Displays Files-In-Use
bryand at recastsoftware.com
Wed Nov 6 16:33:59 PST 2019
Coming up against what I think Neil Sleightholm describes in this thread: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Files-in-use-td2869019.html
We have a fairly simple installer that installs one of two services. Really it's the same service with the same set of files but with the choice of running as LocalSystem versus a specified account. We would like to create a major update that will not re-prompt the user for the service credentials. To that end we've defined the following in InstallExecutionSequence to not modify the service itself on upgrades:
The two service components both include:
<ServiceControl Id="<Unique Name Here>" Start="install" Stop="both" Remove="uninstall" Name="Proxy" Wait="yes" />
This seems to work just fine. The service is installed on install, removed on uninstall, stopped and started on major upgrades. The only hiccup is that when doing a major upgrade we get the files-in-use dialog pointing to the service's process. Which is because the installer hasn't stopped the service yet. Click 'ignore' and everything installs fine and you can see the service being stopped and started properly (including waiting for it to start). Run it silently and it installs just fine.
Any idea of how to handle this and avoid the files-in-use dialog?
FWIW, there's nothing being installed outside of the files required by the service itself so simply disabling that dialog is on the table since there's no other relevant files that would be in use. I've seen suggestions of setting MSIRESTARTMANAGERCONTROL to Disable but that didn't seem to change anything.
More information about the wix-users