copy shortcut to desktop batch file

rgutwein
rgutwein used Ask the Experts™
on
Hello,

I have a shortcut on a shared folder and I would like to have that shortcut copied to a particular users (example "STUDENT") desktop.  How can I do this?

the path of the file is \\server1\testing\testing.exe - shortcut

or is there a way to have the actual executable be put as a shortcut on that users desktop?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Awarded 2009
Top Expert 2010
Commented:
If you are using roaming profiles you could use: copy "\\server1\testing\testing.exe - shortcut" "\\servername\profileshare\%username%\desktop" /y this would need to be run by the user or if you want to run it centrally replace the %username% with the actual username

If it's on a specific computer use "\\server1\testing\testing.exe - shortcut" "\\computername\c$\documents and settings\username\desktop" /y
although if doing it on a specific computer you might want to put it on the all users desktop replace the username part with All Users that way everyone logging onto that computer will have the icon.

Thanks
Glen

Author

Commented:
Thanks for the reply demazter,

Unfortunately we do not use Roaming profiles, and I would like to use

"\\server1\testing\testing.exe - shortcut" "\\computername\c$\documents and settings\username\desktop" /y

but this shortcut needs to be copied on multiple computers on the network.  Is this possible?

Author

Commented:
I figured it out, since it is a shortcut, you have to put a .lnk at the end (even though it does not show up when you have the extension visible.)

copy \\server1\testing\TestTkr.exe.lnk "%userprofile%\desktop"

Thank you for your help!


Randy

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial