Skip navigation

JSI Tip 6035. Freeware shortcut.exe creates shortcuts from the command-line.


Download Shortcut_1.00.zip to create shortcuts from the command-line or in a batch script.

When you type shortcut.exe /?, you receive:

Shortcut version 1.00

Creates, modifies or queries Windows shell links (shortcuts)


The syntax of this command is:

shortcut.exe /F:filename /A:C|E|Q /T:target /P:parameters /W:workingdir
         /R:runstyle /I:icon,index /H:hotkey /D:description

 /F:filename    : Specifies the .LNK or .URL shortcut file.
 /A:action      : Defines the action to take (Create, Edit or Query).
 /T:target      : Defines the target path and file name the shortcut points to.
 /P:parameters  : Defines the command-line parameters to pass to the target.
 /W:working dir : Defines the working directory the target starts with.
 /R:run style   : Defines the window state (1=Normal,3=Maximized,7=Minimized).
 /I:icon,index  : Defines the icon and optional index (file.exe or file.exe,2).
 /H:hotkey      : Defines the hotkey.
 /D:description : Defines the description (or comment) for the shortcut.


 If Query is specified, all arguments except /F are ignored.

 An argument of /? or -? displays this syntax and returns 1.
 A successful completion will return 0.


 Copyright 2000  Marty List

NOTE: See tip 0177, Do your shortcuts attempt to resolve to another computer?



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish