Commandline creation of shortcuts

by Wayne Maples [Published on 20 April 2004 / Last Updated on 20 April 2004]

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.

See Also

See Also

Featured Links