wix - After install different versions of my application side-by-side, uninstall one version doesn't remove shortcut from program menu. -
i created installer using wix. part of installation, 2 shortcuts (launch , uninstall) added "programmenu->mycompany->myproductname".
after install 2 versions of same application side side. tried use uninstall shortcut uninstall 1 version.
the uninstall removes files , folders version. failed remove shortcuts. , when click on uninstall again. following error shows:
"this action valid products installed"
then run uninstall other version, time both shortcuts version removed successfully. leave shortcuts failed version stuck in "programmenu->mycompany->myproductname" forever. had manually delete them.
here code use create shortcuts. did wrong?
<directory id="programmenufolder"> <directory id="mycompanyshortcutdir" name="mycompany"> <directory id="myproductshortcutdir" name="myproduct"> <component id="cmpmyproductshortcut" guid="*"> <shortcut id="myappshortcut" name="my app" description="my application" target="[installfolder]myapp.exe" /> <removefolder id="removemycompanyshortcutdir" on="uninstall" directory="mycompanyshortcutdir" /> <registryvalue root="hkcu" key="software\my company\my product\" name="installed" type="integer" value="1" keypath="yes" /> </component> <component id="cmpuninstall" guid="*"> <shortcut id="uninstallshortcut" name="uninstall" description="uninstall app" target="[system64folder]msiexec.exe" arguments="/x [productcode] /lv d:\uninstall.log " directory="myproductshortcutdir" /> <registryvalue root="hkcu" key="[software\my company\my product\" name="uninstall" type="integer" value="1" keypath="yes" /> <removefolder id="removeshortcut" on="uninstall"/> </component> </directory> </directory> </directory>
i solved issue myself, 2 things needed:
- change productcode *, allows side-by-side install of 2 versions.
- make sure component guid shortcut *
Comments
Post a Comment