[wix-users] Having version number in filenames when apply a patch

robert_yang at agilent.com robert_yang at agilent.com
Mon Nov 14 07:58:00 PST 2016


"Unfortunately it is also not possible leave the old files. We need to remove them due to a framework we use."



Recently we had to do a patch which among other things adds Windows 10 support to a Windows 7 app.  We needed to delete some Start Menu shortcuts and use new ones (Windows 10 flattens folder hierarchies in the Start Menu).  It turns out that if a shortcut's file attribute is set to Hidden then it doesn't show up in the Win 10 start menu.  So our patch contains a custom action which simply does this (it is scheduled for PATCH or REINSTALL).  When the patch is uninstalled, the old shortcuts are repaired anyway, file attributes and all.  It's kind of nasty, but it works.



It might be possible to rename / delete files using such an approach, but I recall having tried that and discarded the idea (can't recall why just now), possibly because of scheduling during repair of the patched product.  Could be worth a try with a toy project first.



-Rob



More information about the wix-users mailing list