A Shortcut object represents a shortcut (also known as shell link) to a file or folder. You can install shortcuts in any folder that you like, but the most common locations are in subfolders under the All Users and Current User trees. See Installing Shortcuts for a list of shortcut folders.
Installation or removal of a shortcut is controlled by its component and its target file or folder. If the component is installed and the shorcut's target file or folder exists, the shortcut is created; if the component is removed, the shortcut is deleted. If a shortcut is not linked to a component, it is created during installation of your product and removed when the product is removed. A shortcut is only created if its target file or folder exists.
Tip: In most cases, we recommend that shortcuts are linked to the same component as their target file or folder. However, if you want to provide an option that allows the user to choose whther or not to install a shortcut, you should create a separate component for the shortcut and place that component in its own feature. The user can then select or deselect the feature to control the installation of the shortcut. (The actual shortcut creation is still subject to the existence of the target file or folder.)
The following attributes and options are available.
|Shortcut title||Enter the user-visible title of the shortcut.|
|Description||Enter the user-visible description of the shortcut. This description is shown in a tooltip window when the user places the mouse cursor over the shortcut.|
Enter the path to the shortcut target, or click ... (browse) to open the Select Installation File or Folder dialog box that allows you to browse for the desired target file or folder. Shortcut targets can have one of the following formats:
Enter the arguments for the shortcut. These arguments are added to the shortcut target's command line when the shortcut is used to open the target file or folder.
Tip: Be sure to quote any arguments that contain spaces or might expand to contain spaces, for example: /p "<INSTALLDIR>\file.ext".
|Start in||Enter the folder in which the shortcut's target must start, or click ... (browse) to open the Select Installation Folder dialog box that allows you to browse for an installation folder. If you leave this field empty, the shortcut's target will start in the folder that contains the target.|
Select the desired initial window state of the shortcut target from the drop-down list. The following choices are available:
|Run As Other User||
Check this box to have Windows display the Run As dialog box when the user opens the target file through the shortcut. The Run As dialog box allows the user to open the target file under a different user account and is useful for programs that must run with elevated (or reduced) privileges.
Note: This option only has effect on Windows 2000 and later.
|Keep during updates||Check this box to keep the shortcut during updates, i.e., when the uninstaller is run in upgrade mode (TsuUpgrade is nonzero).|
|Icon...||Click this button to open the Select Icon dialog box that allows you to specify an alternative icon for the shortcut. If you don't specify an explicit shortcut icon, the shortcut will use the icon that is associated with its target file or folder.|
|Reset icon||Click this box to remove any customized shortcut icon and revert to the default icon, i.e., the icon that is associated with the target file or folder.|