Create a shortcut

This action creates a new Windows shortcut (or link), as the ones you find on your desktop. If you would like Paquet Builder to make your shortcuts automatically, you can use the Shortcut Creation page, although this action offers more options.

Property NameData TypeDescription
DescriptionStringA description for your new shortcut. It will appear in the Tip window when you move the mouse’s cursor on the shortcut’s icon. Optional. IconFilename
IconIndexIntegerIf the icon resource file specified by IconFilename contains several icons, you can indicate which icon should be used (0, 1, 2,…, n-1). Optional (0 by default).
LinkFilenameStringDefines the name of your shortcut (the text which will appear near the icon) and where it will be located. Be sure to give the .lnk extension. See below for examples.
LinkTargetStringThis is the file that will be executed by Windows when you double-click the shortcut (document or executable file). Example: %DESTPATH%\MyDoc.hlp You can select a reference to a file in the package by pressing the “…” button.
ParametersStringAny command line options that should be passed to the target program file. Optional.
ShowWindowdwWindowStateDefines the state of the target program’s window. Optional.
WorkingDirStringSets the default working directory of the shortcut. When the shortcut’s associated target file is run, Windows will set the current directory to this folder. Optional.

Examples for LinkFilename:

  • To create a shortcut on the desktop, enter: %DESKTOPDIR%\My Document.lnk. This will create an icon with the text “My Document” on the Windows desktop.

  • To create a shortcut in a new program menu group, enter this: %PROGMENUDIR%\Hello World\My Document.lnk. This will create a new icon named My Document in the folder Hello World.

If your end users are prompted for selecting a Start Menu folder for your application, then you can also use the %SHORTCUTPATH% variable to place your shortcuts in it. Example: enter %SHORTCUTPATH%\My Document.lnk in the LinkFilename field.

Important: this action does not support creating folders! Ensure that the destination folder for your shortcuts was created before placing them, otherwise your shortcuts will not be created at all. You can use a Create a folder custom action.

Shortcuts are automatically removed when the package is uninstalled.

All available actions

© G.D.G. Software 2018. All rights reserved.