troubleshooting Question

Cannot copy shortcut to desktops

Avatar of Jason Watkins
Jason WatkinsFlag for United States of America asked on
ProgrammingWindows Server 2003
10 Comments1 Solution808 ViewsLast Modified:
Hi,

I have been trying to run a script that should copy a shortcut from a server share to a user's desktop.  I am just trying to get the script to work, but that is not happening.

Script:  

@ECHO OFF
copy  /y "\\server\share$\shortcut" "%USERPROFILE%\Desktop\"
pause

Every time I try and run this from a target workstation, while logged in as a local admin, I get the following message in the command prompt.

The system cannot find the file specified.
Press any key to continue . . .

I can browse to the share and shortcut via UNC path.  Why can't the script find the file if it is plainly there?  I haven't even got to trying top deploy the script yet.

Thanks!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 10 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros