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.

Attribute Description
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.
Shortcut target

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:

  • A symbolic file or folder alias such as <#file_alias> or <folder_alias>. This is the most robust format and is independent of the actual location of the target or any localizations of its name or path.
  • A full or partial path, for example <INSTALLDIR>\MyFolder\MyExe.exe. This may be necessary for non-installation files (which do not have a file alias) or in some other situations. However, they may fail if parts of the path are localized and come out as, for example, <INSTALLDIR>\MeinOrdner\MyExe.exe (German), <INSTALLDIR>\MijnMap\MyExe.exe (Dutch), or <INSTALLDIR>\MonDossier\MyExe.exe (French).
  • A fully qualified URL, for example This results in a URL shortcut.

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:

Show Description
Normal Show the shortcut target normally.
Minimized Show the shortcut target minimized (only on the taskbar).
Maximized Show the shortcut target maximized.
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.

Related topics

Installing Shortcuts, Files and folders, Working with attribute panes