[wix-users] Major Upgrade Service Installer Displays Files-In-Use
Bryan Dam
bryand at recastsoftware.com
Tue Nov 19 14:22:17 PST 2019
Figure I'd throw this out there one last time before caving and working on a bootstrapper.
I've got everything working as I want doing only major upgrades (skipping InstallServices and DeleteServices) but I can't seem to get it to not display the in-use-file dialog because the service is running. Click ignore and everything works fine (service is stopped, files updated, and service restarted).
Thanks,
Bryan
-----Original Message-----
From: Bryan Dam
Sent: Thursday, November 7, 2019 5:06 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: RE: Major Upgrade Service Installer Displays Files-In-Use
If we leave those out then the service is uninstalled along with the old version and re-installed with the new one. This is not a big deal when they choose to run it in local system (the service is recreated with local system) but it's a problem when they choose to use a service account. The uninstall removes the service and since it's an upgrade the install does not prompt for the credentials (which is what we want) but the service can't install because the credential properties are blank and the service won't start. Though, to be fair, I didn't get a files-in-use prompt.
This is why I was using those conditions on the Delete/Install service step. If we just leave the service alone on upgrade then the credentials (and any other service customization they might have done) survives. Which means we don't have to worry about whether they initially selected to use the local system account or a service account either.
Thanks,
Bryan
-----Original Message-----
From: Bob Arnson <bob at firegiant.com>
Sent: Wednesday, November 6, 2019 11:11 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Bryan Dam <bryand at recastsoftware.com>
Subject: RE: Major Upgrade Service Installer Displays Files-In-Use
> To that end we've defined the following in InstallExecutionSequence to not modify the service itself on upgrades:
> <DeleteServices>NOT UPGRADINGPRODUCTCODE</DeleteServices>
> <InstallServices>NOT WIX_UPGRADE_DETECTED</InstallServices>
So what happens if you don't do that?
-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Bryan Dam via wix-users
Sent: Wednesday, 6 November, 2019 19:34
To: wix-users at lists.wixtoolset.org
Cc: Bryan Dam <bryand at recastsoftware.com>
Subject: [wix-users] Major Upgrade Service Installer Displays Files-In-Use
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:
<DeleteServices>NOT UPGRADINGPRODUCTCODE</DeleteServices>
<InstallServices>NOT WIX_UPGRADE_DETECTED</InstallServices>
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.
Bryan
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list