OverviewExamples
Creates a shortcut on the user's system.
Note: If the target drive does not exist or cannot be accessed, the shortcut path folder will be truncated to eight characters. For more information, see Microsoft article Q263324.
(string) The path to the folder where the shortcut will be created.
(string) The label that will be given to the shortcut. This is the shortcut's "name"—i.e., what the user will see.
(string) The full path and name of the file or folder that the shortcut will point to.
(string) The command line arguments (if any) that will be passed to the file linked by the shortcut.
(string) The working directory that will be used for the file pointed to by the shortcut.
(string) The full path to a file containing the icon you want to use. The most common types are icon files (.ico) and executables (.exe). If no icon path is specified, the icon will be taken from the target file instead.
(number) The zero-based index describing which icon to use in the file. For example, an icon index of 2 means it will use the third icon in the file. If there is only one icon in the file, or if you want to use the first icon found, enter 0.
(number) The run mode to use when it launches the file. Choose from:
CONSTANT |
VALUE |
DESCRIPTION |
SW_SHOWNORMAL |
1 |
The file will launch normally. |
SW_MAXIMIZE |
3 |
The file will launch maximized. |
SW_SHOWMINNOACTIVE |
7 |
The file will launch minimized. |
(table) A table containing an optional system-wide key combination that will launch the shortcut, indexed by the following keys:
KEY |
TYPE |
DESCRIPTION |
shift |
boolean |
Whether the "shift" modifier key was held down as part of the key combination. The value true means it was held down and false means it wasn't. This value can be accessed using tb.shift. |
ctrl |
boolean |
Whether the "ctrl" modifier key was held down as part of the key combination. The value true means it was held down and false means it wasn't. This value can be accessed using tb.ctrl. |
alt |
boolean |
Whether the "alt" modifier key was held down as part of the key combination. The value true means it was held down and false means it wasn't. This value can be accessed using tb.alt. |
keycode |
number |
The virtual key code of the key that was pressed. This value can be accessed using tb.keycode. |
Note: If you do not want to assign a hotkey for the shortcut, nil should be passed (nil is the default value).
Nothing. You can use Application.GetLastError to determine whether this action failed, and why.
See also: Related Actions