tags:

views:

425

answers:

1

When Wix creates a shortcut with the same name as an existing shortcut, it overwrites the existing shortcut. Is there a way to detect the existing shortcut and ensure the new shortcut has a unique name?

For example, if Wix installs shortcut "MyApp" on the desktop, but the user already has a shortcut named "MyApp" on their desktop, I'd like Wix to instead install shortcut "MyApp (2)" (or something like that) and leave the existing "MyApp" shortcut unchanged.

+1  A: 

You will need to program it yourself, Wix serves as a pipe to Windows Installer in that case and Windows Installer doesn't have that behavior.
You can write a custom action that will detect that the shortcut exits and will supply a new name (via property), in the wxs create the shortcut but provide [SHORTCUTNAME] for the name attribute.
If you write once of those, I will be happy to get it.

Shay Erlichmen