Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX minor upgrade remove Windows 7 taskbar pinned shortcut

Tags:

wix

Every update to new version WiX for some reason removed pinned start menu shortcut from taskbar. How can I fix this?

Shortcut was created using this command:

   <DirectoryRef Id="ProgramMenuFolder">
      <Component Id="GitExtensions.newstartmenu" Guid="*">
        <Shortcut
          Id="GitExtensions.newstartmenu"
          Name="$(var.ProductName)"
          Description="$(var.ProductName)"
          Icon="gitextensions.ico"
          Target="[INSTALLDIR]GitExtensions.exe"
          WorkingDirectory="INSTALLDIR"/>
        <RegistryValue
          Root="HKCU" Key="$(var.InstalledRegKey)"
          Name="GitExtensions.newstartmenu" Value="" Type="string"
          KeyPath="yes"/>
      </Component>
    </DirectoryRef>

WiX code: https://github.com/gitextensions/gitextensions/blob/f9490e3e6e34cc2f6770fd9e1d6132cf5cfd0b0b/Setup/Product.wxs#L385-L399

Setup had been built in VS2010 + WiX 3.5.

like image 341
KindDragon Avatar asked Dec 31 '25 22:12

KindDragon


1 Answers

It's actually doing a major upgrade and by scheduling RemoveExistingProducts early, the upgrade is removing the older version before installing the newer version. The shell removes the pin when the older shortcut is removed. You can try experimenting with a later scheduling of RemoveExistingProducts but note that there are costs associated with that.

like image 151
Bob Arnson Avatar answered Jan 07 '26 14:01

Bob Arnson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!