Placing a shortcut on the desktop
The Start menu is the best place to place application shortcuts because it keeps them organized and users only see them when they want to. The desktop comes in second though, displaying a user's favorite links front and center.
In this recipe, we'll place a shortcut to our Sample.txt
file on the user's desktop. As we've discussed previously, who will see this shortcut depends on the value of the Package
element's InstallScope
attribute. When it's set to perMachine
, all users will see the shortcut. When set to perUser
, it will be installed only for the current user.
Getting ready
To prepare for this recipe, perform the following steps:
Create a new setup project and name it
DesktopShortcutInstaller
.Include a text file named
Sample.txt
in the project and add aComponent
element to theProduct.wxs
file:<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> <Component Id="cmpSampleTXT" Guid="{EB57CD24-8DEE-41EC...