tags:

views:

170

answers:

1

I have created a Wix installer that places 3 shortcuts onto the desktop. One of these shortcuts references the user's DVD Drive. Is there a way to dynamically set the target of this shortcut based on that drive letter? Would a custom action be the way to go? If so how would I change the target of a shortcut using that custom action. I have been writing my custom actions in C# and would hope to continue doing so.

Thanks for any help.

+1  A: 

You can set the target of a shortcut with the value of a property. For example, the following will take the value of the MYSTUFF property as the target:

<Shortcut Id="MyStuffShortcut" Name='My Stuff' Target="[MYSTUFF]" />

There is no standard windows installer property for "the DVD drive". I'm not sure what that would even mean if there were multiple DVD drives. You can use ROOTDRIVE to refer to the local drive with the most free space. You can use SourceDir to refer to the root of the drive where the installer is being executed from.

Wim Coenen
The problem is that unfortunately your right about how dynamic it would have to be to achieve this. What i have ended up doing is creating a custom action to create the link that runs after my install so the user can select the drive and it generates it from there. Thanks for the response.
Scott Boettger