New Shortcut Command Option

Command Syntax

/NewShortcut  -name <shortcut_name>
              -dir <folder_path>
              -target <file_path>
              [-wkdir <folder_path>]
              [-arg <arguments>]
              [-desc <description>]
              [-icon <file_path>]
              [-index <icon_index>]
              [-mode {normal|minimized|maximized}]
              [-configs <configurations_list>]

Creates a new file shortcut.


  • -name <shortcut_name>
  • The name of the shortcut file.
  • -dir <folder_path>
  • The folder in which the shortcut file is created.
  • -target <file_path>
  • The file to which the shortcut points. It can be a file from the package or an external one.
  • [-advertised]
  • Specify whether the shortcut will be advertised or not.
  • [-runasadmin]
  • Runs the shortcut as an administrator while protecting your computer from unauthorized activity.
  • [-pin_to_taskbar]
  • The shortcut will be pinned to Taskbar
  • [-wkdir <folder_path>]
  • The shortcut's Working folder.
  • [-arg <arguments>]
  • The shortcut arguments.

NoteFor the shortcut arguments, you can escape a " character by adding another quote next to it: "". The external quotes are removed by command line interpreter and are not passed on to tool.

  • [-desc <description>]
  • The shortcut's description.
  • [-icon <file_path>]
  • The shortcut icon's path.
  • [-index <icon_index>]
  • Specifies which icon to display from a file containing more then one icon. It must be a non-negative number.
  • [-mode {normal|minimized|maximized}]
  • The Show command for the application window.
  • [-configs <configurations_list>]
  • Only available for WinCE projects. Specify in which configurations to include the shortcut. Separate them by ";" character.

Internal Shortcut example: /edit MyProject.aip
    /NewShortcut -name MyShortcut
        -dir DesktopFolder
        -target APPDIR\MyApplication.exe
        -arg """C:\My Arguments Folder\MyArgFile.arg"" /AppArg" -icon C:\ShIcon.ico

External Shortcut example: /edit MyProject.aip
    /NewShortcut -name MyShortcut
        -dir DesktopFolder
        -target [WindowsVolume]MyApplication.exe
        -arg /AppArg -icon C:\ShIcon.ico

NoteNote that the property in the -target field must be enclosed in square brackets. There is no backslash required after the property, because the Windows Installer Folder property already contains a trailing backslash ("\")

For WinCE projects: /edit MyProject.aip
    /NewShortcut -name MyShortcut
        -dir %CE3%
        -target %InstallDir%\MyApplication.exe
        -configs Default;Configuration1