[wix-users] Stop Uninstalling of Services during Major Upgrade

Hoover, Jacob Jacob.Hoover at greenheck.com
Thu Nov 16 08:31:01 PST 2017


Look at /MajorUpgrade/@Schedule, 

afterInstallValidate
(Default) Schedules RemoveExistingProducts after the InstallValidate standard action. This scheduling removes the installed product entirely before installing the upgrade product. It's slowest but gives the most flexibility in changing components and features in the upgrade product. Note that if the installation of the upgrade product fails, the machine will have neither version installed. 

afterInstallInitialize
Schedules RemoveExistingProducts after the InstallInitialize standard action. This is similar to the afterInstallValidate scheduling, but if the installation of the upgrade product fails, Windows Installer also rolls back the removal of the installed product -- in other words, reinstalls it. 

afterInstallExecute
Schedules RemoveExistingProducts between the InstallExecute and InstallFinalize standard actions. This scheduling installs the upgrade product "on top of" the installed product then lets RemoveExistingProducts uninstall any components that don't also exist in the upgrade product. Note that this scheduling requires strict adherence to the component rules because it relies on component reference counts to be accurate during installation of the upgrade product and removal of the installed product. For more information, see Bob Arnson's blog post "Paying for Upgrades" for details. If installation of the upgrade product fails, Windows Installer also rolls back the removal of the installed product -- in other words, reinstalls it. 

afterInstallExecuteAgain
Schedules RemoveExistingProducts between the InstallExecuteAgain and InstallFinalize standard actions. This is identical to the afterInstallExecute scheduling but after the InstallExecuteAgain standard action instead of InstallExecute. 

afterInstallFinalize
Schedules RemoveExistingProducts after the InstallFinalize standard action. This is similar to the afterInstallExecute and afterInstallExecuteAgain schedulings but takes place outside the installation transaction so if installation of the upgrade product fails, Windows Installer does not roll back the removal of the installed product, so the machine will have both versions installed.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Ven H via wix-users
Sent: Thursday, November 16, 2017 10:15 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Ven H <venh.123 at gmail.com>
Subject: [wix-users] Stop Uninstalling of Services during Major Upgrade

I have a 1.0.0 version in which I am installing and starting services. But while upgrading, I am only adding a new file and updating an existing file and not doing any changes in the service. But still the service is getting uninstalled and reinstalled.
I have added the following 2 elements in the Products.wxs file for version
2.0.0

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

<InstallExecuteSequence>
      <DeleteServices>NOT UPGRADINGPRODUCTCODE</DeleteServices>
  </InstallExecuteSequence>

Can anyone please help? What am I missing here?

Regards,
Venkatesh

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list