[wix-users] Shortcuts Lost after Major Upgrade

David Watson dwatson at sdl.com
Fri Mar 24 08:31:13 PDT 2017

Check the log.

Prime suspect is the file version of myprogram.exe, make sure its higher than in V1.


SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us.

SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Brian Enderle
Sent: 24 March 2017 14:34
To: WiX Users <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Shortcuts Lost after Major Upgrade

I have a situation where I install version 1 of my program and I have the expected shortcuts.  I can also install version 2 and have the expected shotcuts.

However, when I upgrade from version 1 to version 2, the shortcuts are deleted and not recreated.

Here is the code that should create the shortcuts:

   <ComponentGroup Id="ProductComponents" Directory="INSTALL_FOLDER">
     <Component Id="MyProgramEXE">

       <File Id="MyProgramEXE"

         <!-- Create Shortcuts for Admin & regular user in the program menu dir -->
         <Shortcut Id="ProgramMenuDirShortcutAdmin"
                   Name="$(var.ProductName) - Admin"
                   Description="$(var.ProductName) for the admin"

         <Shortcut Id="ProgramMenuDirShortcutUser"
                   Name="$(var.ProductName) - User"
                   Description="$(var.ProductName) for the end user"
                   Icon="MyIcon.ico" />

       <!-- Remove Start Menu on uninstall -->
       <RemoveFolder Id="RemoveProgramMenuFolderApplication"
Directory="ProgramMenuFolderCompany" On="uninstall" />

The only thing I can think of is I changed the @MajorUpgrade component between versions so as to preserve user modified files during upgrades:

Version 1:
   <MajorUpgrade Schedule="afterInstallInitialize"
                 DowngradeErrorMessage="A newer version of
$(var.ProductTitle) is already installed." />

Version 2:
   <MajorUpgrade Schedule="afterInstallExecute"
                 DowngradeErrorMessage="A newer version of
$(var.ProductTitle) is already installed." />


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/

This message has been scanned for malware by Websense. www.websense.com

More information about the wix-users mailing list