How do I create a shortcut from the command prompt?

John Savill

January 8, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. A. There is a utility supplied with the Windows NT Server Resource Kit Version 4.0 Supplement One (phew) called shortcut.exe which can be used to create .lnk files. The application is quite powerful, and allows you to specify not only the resource to link to, but also an icon etc. An example is shown below

shortcut -t "d:program filesjohnsapptest.exe" -n "Johns App.lnk" -i "d:program filesjohniconicon1.ico" -x 0 -d "e:johnsdata"

What does it mean?

-t this is the location of the resource to be linked to
-n the name of the link file to be created
-i the icon file
-x the icon index to use in the icon file
-d the starting directory for the application once started

You can copy shortcut.exe off of the CD with the resource kit, and it is located in desktop (e.g. i386desktop). There are no other files needed, just shortcut.exe.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like