Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Desktop Shortcut

Status
Not open for further replies.

cccruz18

Programmer
Jun 11, 2002
16
PH
Hi!
How can I create a desktop shortcut using the command prompt?
Ann
 
Hi,

try "shortcut" command from command line

syntax :

shortcut /?

shortcut: [-? -h -f -c -r -s] [[-t] target [[-n] name]] [-d working directory]
[-a Arguments] [-i Iconfile] [-x Icon index] [-u {all|[natdix]}]
[-l logfile]

-? -h This help
-f Force overwrite of an existing short cut
-c Change existing shortcut
-s Make shortcut non tracking (Stupid)
-r Resolve broken shortcut
-t target Specifies the target of the shortcut
-n name Specifies the file name of the shortcut file
-d directory Specifies the directory name to start the application in
-a arguments Specifies the arguments passed when the shortcut is used
-i iconfile Specifiles the file the icon is in
-x index Specifies the index into the icon file
-u [spec] Dumps the contents of a shortcut. 'all' is the same as 'natdix'
but the letters of 'natdix' can be specified to display specific
fields in the shortcut (repeats allowed, and order followed)
-l logfile record error messages in specified file


HTH
Aslam
 
Hi!
Shortcut is not recognized as an internal or external command error.
I'm using windows 2000.

Thanks.
 
Thanks Aslamvs!
I've copied shortcut.exe and used it to create a shortcut in my application. However, If the desktop path is not specified, .lnk is created in default drive or c:\. Problem is that once another user is going to log, desktop path changes. Would you know a way that I can define a desktop path that will be generic to all user.

Regards,
Ann
 
In Windows 2000, by default user profiles are stored at c:\documents and settings. Since the shortcut is already installed on your user profile, try copying the shortcut to c:\documents and settings\all users\desktop folder. This should place a copy of your shortcut on every persons desktop who logs onto this computer.
 
In Windows 2000, by default user profiles are stored at c:\documents and settings. Since the shortcut is already installed on your user profile, try copying the shortcut to c:\documents and settings\all users\desktop folder. This should place a copy of your shortcut on every persons desktop who logs onto this computer.

Mitchell Ginsberg
 
Hi,

mginsberg is correct try to create shortcut from this location

"c:\documents and settings\all users\desktop"

This will visible for all users. Aslam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top