[wix-users] Major Upgrade "afterInstallFinalize" deletes shortcuts

Phil Wilson phil.wilson at mvps.org
Mon Nov 2 09:24:00 PST 2015


There's no reason for the upgrade to actively delete the shortcuts - after
all, an upgrade is just an uninstall of the older product and an install of
a new product. Are the shortcuts in the incoming upgrade? If you uninstall
the older product manually and then install the upgrade, are the shortcuts
installed? In case you broke component rules, try the upgrade with
MSIENFORCEUPGRADECOMPONENTRULES set to 1. 

https://msdn.microsoft.com/en-us/library/aa370093.aspx

By the way, scheduling the upgrade after InstallExecute also keeps user
modifiled files and had the advantage of being part of the transaction. A
failure of the install after InstallFinalize will cause that new install to
roll back and remain installed, then you'll have both old and new products
on the system. 

Phil

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Brian Enderle
Sent: Friday, October 30, 2015 3:45 PM
To: WiX Users
Subject: [wix-users] Major Upgrade "afterInstallFinalize" deletes shortcuts

I am using the following for MajorUpgrades to prevent the upgrade from
overwriting any configuration files that may have been modified by the user:

    <!-- 'afterInstallFinalize' keeps any user modified files (i.e.,
config.xml) from being removed during an upgrade -->
    <MajorUpgrade DowngradeErrorMessage="A newer version of
$(var.ProductName) is already installed."
                  AllowDowngrades="no"
                  AllowSameVersionUpgrades="no"
                  Schedule="afterInstallFinalize"/>

I have noticed an error though when upgrading in that the shortcuts
(desktop, start menu, etc.) installed by the first installation are being
deleted by the upgrade.

Is there a way to keep the shortcuts from being deleted on upgrade?

Brian

If you can't explain it simply, you don't understand it well enough.  -
Albert Einstein

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




More information about the wix-users mailing list