SFX commands: Shortcut


Shortcut=<DestType>,<SrcName>,<DestFolder>,<Description>,<ShortcutName>,<ShortcutIcon>

Create a shortcut to unpacked file.

DestType is one character wide field, which can have the following values:

 

D Create a shortcut on Desktop
S Create a shortcut in Start Menu
P Create a shortcut in Start Menu/Programs
T Create a shortcut in Startup folder

SrcName is a name of archived file.

DestFolder is a folder to create a shortcut in. If it does not exist, it will be created by SFX archive.

Description is a text string describing a shortcut.

ShortcutName is a name of .lnk (shortcut) file created by SFX.

ShortcutIcon is a name of icon file associated with shortcut. If you omit this parameter, the default icon will be used. If icon file name does not contain the full path, SFX archive will search the icon file in folder containing unpacked files.

All parameters are separated by commas. If you need to put a comma character inside of parameter, enclose the whole parameter to quotes. Repeat quotes twice if you need to insert a quote mark into string. Only DestType and SrcName are required, other parameters are optional.

Example

Create a shortcut in folder WinRAR on Desktop to archived file winrar.exe with the description "WinRAR executable file", name "WinRAR archiver" and icon winrar.ico:

Shortcut=D, winrar.exe, WinRAR, "WinRAR executable file", "WinRAR archiver", winrar.ico