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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch File - Copy Shortcut to User's Desktop 1

Status
Not open for further replies.

SHardy

Programmer
May 9, 2001
231
GB
Hi,

I have a batch file to be run by certain users here to update certain files. One of the files that I want to copy is a shortcut to be copied to each user's desktop.

What is the variable to be used for the current username?
How do I use this to copy the shortcut to the user's desktop within their local profile?

Thanks,
Simon
 
I am sure that the variable would be %username%

I would guess you would do something like :-

copy c:(backslash...sorry, crappy keyboard can't find the backslash)shortcut.lnk c:(*)Windows(*)Profiles(*)%username%(*)desktop

or where ever your profiles are being stored.
 
Thanks. I knew it should be easy. Doh!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top