Commandline creation of shortcuts

  • Section(s): Commandline
  • Published on Apr 20, 2004.
  • Last Modified on Apr 20, 2004.
  • Last Modified by Wayne Maples.
  • Rated 3 out of 5 based on 2 votes.
Windows NT Server Resource Kit utility shortcut.exe allows one to create shortcuts, .lnk files, from the commandline. Want to create a standard shortcut on all desktops? Issue command during logon script processing. The syntax is:

shortcut -t pathtoprogram -n shortcutname -i pathtoicon -x iconindex -d startupdirectory

For example, to create a shortcut for my editor, UltraEdit:

shortcut -t "D:\Program Files\UltraEdit\UEDIT32.EXE" -n "My Editor.lnk" -i "D:\Program Files\UltraEdit\UEDIT32.EXE" -x 0 -d d:\data

where the parameters are :

-t : path to object to be linked
-n : lnk file name
-i : path to object icon file
-x : icon index (0 - first icon, 1 - second icon, ...)
-d : startup directory

The utility can be found in the \i386\desktop folder. Its on the original server reskit CD but not on supplement 4.

About Wayne Maples

Share this article


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred Help Desk solution?