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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With