[wix-users] Shortcuts Lost after Major Upgrade

Tom Brezinski tom.brezinski at ViaviSolutions.com
Mon Mar 27 04:08:44 PDT 2017


Did you verify that the EXE file exists after upgrade from version 1 to version 2?  With MajorUpgrade scheduled afterInstallExecute if the GUID or component ID changes on a file it will get removed when the upgrade runs after installExecute even if installExecute put down a file in the same spot with a different GUID or component.  Try using Orca to find the GUID for the Component in v1 and manually specify that GUID on the component in v2 to ensure it does not change.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of David Watson
Sent: Friday, March 24, 2017 10:31 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Shortcuts Lost after Major Upgrade

Check the log.

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




[http://dr0muzwhcp26z.cloudfront.net/static/corporate/SDL_emailLogo.png]<www.sdl.com/>
www.sdl.com


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"
             Source="$(var.MyProgram.TargetDir)MyProgram.exe"
             Vital="yes"
             KeyPath="yes">

         <!-- Create Shortcuts for Admin & regular user in the program menu dir -->
         <Shortcut Id="ProgramMenuDirShortcutAdmin"
                   Name="$(var.ProductName) - Admin"
                   Description="$(var.ProductName) for the admin"
                   Directory="ProgramMenuFolderCompany"
                   WorkingDirectory="INSTALL_FOLDER"
                   Arguments="Admin"
                   Advertise="yes"
                   Icon="MyIcon.ico"/>

         <Shortcut Id="ProgramMenuDirShortcutUser"
                   Name="$(var.ProductName) - User"
                   Description="$(var.ProductName) for the end user"
                   Directory="ProgramMenuFolderCompany"
                   WorkingDirectory="INSTALL_FOLDER"
                   Advertise="yes"
                   Icon="MyIcon.ico" />
       </File>

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


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"
                 AllowSameVersionUpgrades="no"
                 DowngradeErrorMessage="A newer version of
$(var.ProductTitle) is already installed." />


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/


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

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



More information about the wix-users mailing list