[wix-users] Prevent desktop shortcut when applying a patch
john daintree
johnd at dyalog.com
Wed Dec 8 01:07:20 PST 2021
Hello Jacob and all,
(I'm not sure if protocol is that I should reply to all, or just to the
list)
Thank you for that suggestion Jacob. I think I've done as you describe (new
files attached), but it doesn't appear to help.
There's nothing configured to uninstall before patching.
/JD
From: Hoover, Jacob <Jacob.Hoover at greenheck.com>
Sent: 06 December 2021 17:01
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: john daintree <johnd at dyalog.com>
Subject: RE: [wix-users] Prevent desktop shortcut when applying a patch
Use a reg key as the key path and have it in the same component as the
shortcut. I believe Windows installer will skip recreating the shortcut, as
it will detect the key path is already installed and not re-create it.
Note, this should work for patches and major upgrades, assuming you don't
reschedule the major upgrade to uninstall before installing. (Look at
@Schedule on
https://wixtoolset.org/documentation/manual/v3/xsd/wix/majorupgrade.html)
From: wix-users <wix-users-bounces at lists.wixtoolset.org
<mailto:wix-users-bounces at lists.wixtoolset.org> > On Behalf Of john daintree
via wix-users
Sent: Monday, December 6, 2021 5:58 AM
To: wix-users at lists.wixtoolset.org <mailto:wix-users at lists.wixtoolset.org>
Cc: john daintree <johnd at dyalog.com <mailto:johnd at dyalog.com> >
Subject: [wix-users] Prevent desktop shortcut when applying a patch
This is my first post to the list, I hope I'm doing this correctly.
I'm trying to write a patch that doesn't reinstall a desktop shortcut if the
user deleted the shortcut since the base product was installed. The steps
are:
1. Install the product
2. Delete the desktop shortcut
3. Apply the patch
a. At this point the desktop shortcut is reinstalled. I want to prevent
this.
I've tried adding a condition to the shortcut element of the package:
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Component Id="desktopshortcut"
Guid="{d178ae9c-026c-4a6c-9329-c67276fabd8e}">
<Condition>NOT PATCH</Condition>
<Shortcut Id="desktopshortcut" Name="Sample"
Directory="DesktopFolder" Target="[TARGETDIR]sample.txt" Show="normal" />
</Component>
</DirectoryRef>
</Fragment>
But that hasn't done it. I'm not sure what else to do.
I've attached my product.wxs and patch.wxs which are based on the samples
provided here:
https://wixtoolset.org/documentation/manual/v3/patching/wix_patching.html
I'd appreciate any help.
Thanks.
/JD
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/ <http://www.firegiant.com>
NOTE: This email was received from an external source. Please use caution
when opening links or attachments in the message.
More information about the wix-users
mailing list