Shortcut Element

WiX Help

Shortcut Element

Description

Shortcut, default target is parent File, CreateFolder, or Component's Directory

Windows Installer references
Shortcut Table
Parents
Component, CreateFolder, File, Include
Inner Text
None
Children
Sequence (min: 1, max: 1)
  1. Icon (min: 0, max: 1)
Attributes
Name Type Description Required
Id String Unique identifier for the shortcut. This value will serve as the primary key for the row. Yes
Advertise YesNoType Specifies if the shortcut should be advertised or not. Note that advertised shortcuts always point at a particular application, identified by a ProductCode, and should not be shared between applications. Advertised shortcuts only work for the most recently installed application, and are removed when that application is removed.  
Arguments String The command-line arguments for the shortcut. Note that the resolution of properties in the Arguments field is limited. A property formatted as [Property] in this field can only be resolved if the property already has the intended value when the component owning the shortcut is installed. For example, for the argument "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and the component that owns the shortcut.  
Description String The localizable description for the shortcut.  
DescriptionResourceDll String The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally authored using [#filekey] form. When this attribute is specified, the DescriptionResourceId attribute must also be provided.

This attribute is only used on Windows Vista and above. If this attribute is not specified and the install is running on Vista and above, the value in the Name attribute is used. If this attribute is provided and the install is running on Vista and above, the value in the Name attribute is ignored.

 
DescriptionResourceId Integer The description name index for the shortcut. This must be a non-negative number. When this attribute is specified, the DescriptionResourceDll attribute must also be populated.

This attribute is only used on Windows Vista and above. If this attribute is not specified and the install is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and the install is running on Vista and above, the value in the Name attribute is ignored.

 
Directory String Identifier reference to Directory element where shortcut is to be created. Yes
DisplayResourceDll String The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally authored using [#filekey] form. When this attribute is specified, the DisplayResourceId attribute must also be provided.

This attribute is only used on Windows Vista and above. If this attribute is not populated and the install is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and the install is running on Vista and above, the value in the Name attribute is ignored.

 
DisplayResourceId Integer The display name index for the shortcut. This must be a non-negative number. When this attribute is specified, the DisplayResourceDll attribute must also be proviced.

This attribute is only used on Windows Vista and above. If this attribute is not specified and the install is running on Vista and above, the value in the Name attribute is used. If this attribute is specified and the install is running on Vista and above, the value in the Name attribute is ignored.

 
Hotkey Integer The hotkey for the shortcut. The low-order byte contains the virtual-key code for the key, and the high-order byte contains modifier flags. This must be a non-negative number. Authors of installation packages are generally recommend not to set this option, because this can add duplicate hotkeys to a users desktop. In addition, the practice of assigning hotkeys to shortcuts can be problematic for users using hotkeys for accessibility.  
Icon String Identifier reference to Icon element. The Icon identifier should have the same extension as the file that it points at. For example, a shortcut to an executable (e.g. "my.exe") should reference an Icon with identifier like "MyIcon.exe"  
IconIndex Integer Identifier reference to Icon element.  
LongName LongFileNameType Localizable long name for shortcut if a name longer than 8.3 format is desired.  
Name ShortFileNameType Localizable short name for the shortcut. Must be an 8.3 file name. Yes
Show Enumeration This attribute's value should be one of the following:
normal
minimized
maximized
 
Target String The target for a non-Advertised shortcut. This attribute is not valid for Advertised shortcuts. The value will be defaulted to the parent File when nested under a File element. If you specify this value then use a formatted file identifier, for example: [!TargetFileId].  
WorkingDirectory String Directory identifier (or Property identifier that resolves to a directory) that resolves to the path of the working directory for the shortcut.  
See Also
Wix Schema