InstallerTaskBase.

InstallerShortcutsElement Property

Summary

Creates shortcuts on the target computer.

Parameters

Attribute Type Description Required
name string Unique name identifying the shortcut. True
directory string Reference to a directory. The location of where the shortcut should be created. True
filename string The localizable name of the shortcut to be created. True
component string Reference to a component. The installer uses the installation state of this specified component 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. True
target string The shortcut target. 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. True
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.
False
hotkey string 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. False
icon string Reference to an icon. False
iconindex int The icon index for the shortcut. This must be a non-negative number. False
showcmd int The Show command for the application window.
The following values may be used. The values are as defined for the Windows API function ShowWindow. DescriptionSW_SHOWNORMALSW_SHOWMAXIMIZEDSW_SHOWMINNOACTIVE
Value
1
3
7
False
wkdir string The name of the property that has the path of the working directory for the shortcut. False

Nested Elements:

<description>

    The localizable description of the shortcut.

</description>

Examples

Add a compiled help icon to the msi database; To be used with a shortcut. <shortcuts> <shortcut name="HelpFiles" directory="D__PROGRAMMENU_ACME_MYPRODUCT" filename="Help File" component="C__MainFiles" target="[$C__MainFiles]\Help.chm" icon="CHMICON" iconindex="0" showcmd="3" > <description>My Product help documentation</description> </shortcut> </shortcuts>
Assembly
NAnt.Contrib.dll
Namespace
NAnt.Contrib.Tasks.Msi
Containing Type
InstallerTaskBase

Syntax

[BuildElement("shortcuts", ProcessXml = false)]
public SchemaElement[] InstallerShortcutsElement { get; set; }

Attributes

Type Description
BuildElement

Value

Type Description
SchemaElement[]