I'd like to use pstools to copy a .lnk file from a network share to a local folder on each workstation's desktop.

Having some difficulty with the syntax/understanding what exactly i'm trying to accomplish.

psexec -s \\hostname-pc COPY \\server\share\file.lnk ????C:/?  I'm not sure how to "phrase" the destination.  

Since the initial command of "psexec -s \\hostname-pc . . ." runs the command from THAT hostname-pc right?  So do I have to use a "shared" folder on the workstation to copy this file to?  Or since i'm running the command from that workstation can I use any filepath?  

I have a .lnk(shortcut) file that runs system restore and creates a manual restore point.  I'd like to push this file to my desktop users local machines so the shortcut could be run at anytime.  Well over 100 workstations to copy this file to so using psexec or something similar would be awesome.
Daniel ChecksumAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

NVITConnect With a Mentor Commented:
To copy to all stations in the domain...
psexec \\* -s -c cmd /c COPY \\server\share\file.lnk c:\

Open in new window

To copy to certain stations in the domain...

- Make a .txt file containing the destination host names, one name per line. E.g. Names.txt

Open in new window

psexec @names.txt -s -c cmd /c COPY \\server\share\file.lnk c:\

Open in new window

Daniel ChecksumAuthor Commented:
So I would be able to write directly to root C:\?   Or would I have to choose like C:\%userprofile%\Documents ?  

That is where my confusion lies, on the destination end of the copy command.  I appreciate your clear and concise suggestion though.
NVITConnect With a Mentor Commented:
That complicates things. You'll need each user name to feed into it.

I think you can use the public folder since all/most use the same path.

Or use a gpo/gpp instead of psexec
Worried about phishing attacks?

90% of attacks start with a phish. It’s critical that IT admins and MSSPs have the right security in place to protect their end users from these phishing attacks. Check out our latest feature brief for tips and tricks to keep your employees off a hackers line!

Daniel ChecksumAuthor Commented:
If domain admins have local access to each workstation(which should be already configured) then I should be able to use our domain Administrator account on each workstation right?  My ex-boss also recommended using the Public folders.
NVITConnect With a Mentor Commented:
As long as its the same on all stations, it should work.
E.g. C:\users\adminname\Documents
Daniel ChecksumAuthor Commented:
Thanks for all your help, NVIT.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.