[wix-users] Prevent desktop shortcut when applying a patch
john daintree
johnd at dyalog.com
Mon Dec 6 03:57:53 PST 2021
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
More information about the wix-users
mailing list