Create a shortcut (LNK) to an application.


First available in version 3.0 build 2039.

Input Parameters:

shortcutFile - A fully qualified path to the link file you want to create. The file must have an extension of .LNK to be recognized by Windows. This parameter supports monikers.

description - [Optional] - Text that will appear in the shortcut comments/description field.

source - A fully qualified path to the target application for the shortcut. The specified target file must exist. This parameter supports monikers.

workDir - [Optional] - A fully qualified path that will be used as the working directory for the target application. This parameter supports monikers.

arguments - [Optional] - Arguments that will be passed to the target application at startup.

iconFile - [Optional] - A fully qualified path to an ICO file for the shortcut. This parameter supports monikers.

iconIndex - [Optional] - Index number for the icon within the supplied 'IconFile'. Default value is 0.

show - [Optional] - The startup mode for the application. Valid values include: Normal,Minimized,Maximized. Default value is Normal.

Output Parameters:

No output parameters.

Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.FileSys.createShortcut( paramsObject [, callbackParamsObject] [, errorParamsObject] );

Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.FileSys.createShortcut( paramsObject );





The following example creates a shortcut on the user's desktop that opens an executable file in the Program Files directory. The application will open maximized.

    shortcutFile:"desktop://Start SuperApp.lnk",
    description:"Starts the SuperApp application.",
    source:"programfiles://My Company\\superapp.exe",