windowsShortcut

Summary

Creates a windows shortcut to the installed software.

Method of

File object

Syntax

int WindowsShortcut(
  FolderObject aTarget,
  FolderObject aShortcutPath,
  String aDescription,
  FolderObject aWorkingPath,
  String aParams,
  FolderObject aIcon,
  Number aIconId);

Parameters

The windowsShortcut method has the following parameters:

aTarget
A FileSpecObject representing the absolute path (including filename) to file that the shortcut will be created for.
aShortcutPath
A FileSpecObject representing the absolute path (not including filename) to where the shortcut is to be created.
aDescription
String description for the shortcut to be used as the shortcut name with a .lnk extension (do not include .lnk in the string).
aWorkingPath
A FileSpecObject representing the absolute path to the working dir for where aTarget will is to be run from.
aParams
Parameters that aTarget requires.
aIcon
A FileSpecObject representing the absolute path (including fiilename) to a file that contains icons. Can be either .ico, .dll, .exe, or any other binary file that contains icons.
aIconId
Index of the icon from aIcon to use for this shortcut.

Returns

An integer error code. For a list of possible values, see Return Codes.

Example

See File.windowsShortcut in the script examples chapter.

Document Tags and Contributors

 Contributors to this page: Sheppy, ethertank, trevorh, Fredchat, Rod Whiteley
 Last updated by: Sheppy,