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
P Create a shortcut in Start Menu/Programs
T Create a shortcut in Startup folder

SrcName is a name of archived file. If it is an executable, you can specify additional parameters after the name enclosed in quote marks.

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 and can be omitted or left empty.

Examples

1. 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

2. Provide additional parameters for rar.exe, omit DestFolder and ShortcutIcon parameters:

Shortcut=D, "rar.exe" a -ag c:\mydata\backup\daily c:\mydata\files, , Daily backup, Backup