Redigera

Dela via


Shortcut Table

The Shortcut table holds the information the application needs to create shortcuts on the user's computer.

The Shortcut table has the following columns.

Column Type Key Nullable
Shortcut Identifier Y N
Directory_ Identifier N N
Name Filename N N
Component_ Identifier N N
Target Shortcut N N
Arguments Formatted N Y
Description Text N Y
Hotkey Integer N Y
Icon_ Identifier N Y
IconIndex Integer N Y
ShowCmd Integer N Y
WkDir Identifier N Y
DisplayResourceDLL Formatted N Y
DisplayResourceId Integer N Y
DescriptionResourceDLL Formatted N Y
DescriptionResourceId Integer N Y

 

Columns

Shortcut

The key value for this table.

Directory_

The external key into the first column of the Directory table. This column specifies the directory in which the Shortcut file is created.

Name

The localizable name of the shortcut to be created.

Component_

The external key into the first column of the Component table. The installer uses the installation state of the component specified in this column to determine whether the shortcut is created or deleted. This component must have a valid key path for the shortcut to be installed. If the Target column contains the name of a feature, the file launched by the shortcut is the key file of the component listed in this column.

Target

The shortcut target.

For an advertised shortcut, this column must be an external key into the first column of the Feature table. The installer evaluates the entry in the Target field as an Identifier and the entry must be a valid foreign key into the Feature Table. The file launched by the shortcut in this case is the key file of the component listed in the Component_ column. When the shortcut is activated, the installer verifies that all the components in the feature are installed before launching this file.

For a non-advertised shortcut, the installer evaluates this field as a Formatted string. The field should contains a property identifier enclosed by square brackets ([ ]), that is expanded into the file or a folder pointed to by the shortcut. For more information, see the CreateShortcuts action.

Arguments

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 that owns the shortcut is installed. For example, to resolve to the correct value for the argument "[#MyDoc.doc]", the same process must be installing the file MyDoc.doc and the component that owns the shortcut.

Description

The localizable description of the shortcut.

Hotkey

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 recommended not to set this option, because the setting of this option can add duplicate hotkeys to a user's desktop. In addition, the practice of assigning hotkeys to shortcuts can be problematic for users using hotkeys for accessibility.

Icon_

The external key to column one of the Icon table.

IconIndex

The icon index for the shortcut. This must be a non-negative number.

ShowCmd

The Show command for the application window.

The following values may be used. The values are as defined for the Windows API function ShowWindow.

Value Meaning
1 SW_SHOWNORMAL
3 SW_SHOWMAXIMIZED
7 SW_SHOWMINNOACTIVE

 

WkDir

The name of the property that has the path of the working directory for the shortcut. The value can use the Windows format to reference environment variables, for example %USERPROFILE%. The references are resolved to an actual path when the installer resolves the working directory to create the shortcut.

DisplayResourceDLL

This field contains a Formatted string value for the full path to the language-neutral portable executable (LN file) that contains the resource configuration (RC Config) data. The formatted string can use the [#filekey] convention. If this field contains a value, the Name column is ignored. If this field is empty, the installer uses the value in the Name column. When this field contains a value, the DisplayResourceId field is also required to contain a value, or the installation fails.

This column of the Shortcut table is used only when running on Windows Vista or Windows Server 2008 and is otherwise ignored. This column is available with versions not earlier than Windows Installer 4.0.

For information about how to add shortcuts to Shortcut table for use with MUI resources see A MUI Shortcut Example.

DisplayResourceId

The display name index for the shortcut. This must be a non-negative number. When this field contains a value, the DisplayResourceDLL field is required to also contain a value or the installation fails.

This column of the Shortcut table is used only when running on Windows Vista or Windows Server 2008 and is otherwise ignored. This column is available with versions not earlier than Windows Installer 4.0.

DescriptionResourceDLL

This field contains a Formatted string value for the full path to the language-neutral portable executable (LN file) that contains the resource configuration (RC Config) data. The formatted string can use the [#filekey] convention. If this field contains a value, the Name column is ignored. If this field is empty, the installer uses the value in the Description column. When this field contains a value, the DescriptionResourceId field is also required to contain a value, or the installation fails.

This column of the Shortcut table is used only when running on Windows Vista or Windows Server 2008 and is otherwise ignored. This column is available with versions not earlier than Windows Installer 4.0.

For information about how to add shortcuts to Shortcut table for use with MUI resources see A MUI Shortcut Example.

DescriptionResourceId

The description name index for the shortcut. This must be a non-negative number. When this field contains a value, the DescriptionResourceDLL field is required to also contain a value or the installation fails.

This column of the Shortcut table is used only when running on Windows Vista or Windows Server 2008 and is otherwise ignored. This column is available with versions not earlier than Windows Installer 4.0.

Remarks

The enabling of a feature creates an advertised shortcut only if the system's IShellLink interface supports installer descriptor resolution. This is supported by Microsoft Windows 2000 and systems running Microsoft Internet Explorer 4.01. If unsupported, the installer creates a non-advertised shortcut upon the installation of the feature's component, either locally or run from source.

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.

This table is referred to when the CreateShortcuts action and the RemoveShortcuts action is executed.

See also the DISABLEADVTSHORTCUTS property.

Validation

ICE03
ICE06
ICE19
ICE32
ICE36
ICE46
ICE50
ICE57
ICE59
ICE67
ICE69
ICE80
ICE90
ICE91
ICE94