Copy files at logon from server share

I need to copy a file from a server share to the users c: drive of their computer or at least somewhere hidden that they can't make any changes.  When I try robocopy "\\serv\file.vbs" "c:\file.vbs" /MIR I get an error saying the source doesn't exist
LVL 2
stlhostAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jack LloydTechnical Services AnalystCommented:
You could use group policy preferences for that, but I do something similiar in my environment

What I do is have the folder with all the IT stuff in (corporate wallpapers, reg keys) I want to copy to all local computers hard drives, and I have this do at startup and shutdown, that way it's always up to date

Here's my robocopy script :)

robocopy.exe \\domainname.com\netlogon\IT c:\_IT *.* /E /V /R:1 /W:1 /MT:64 /ZB /SEC

Good Luck!
stlhostAuthor Commented:
------------------------------------------------------------------------------

2015/05/27 07:44:53 ERROR 267 (0x0000010B) Accessing Source Directory \\server1\
client\removelocaladmins.vbs\
The directory name is invalid.
Jack LloydTechnical Services AnalystCommented:
Does it happen if you pre-create the folder on the hard drive? Sounds like the script doesn't have permission to create the folder.

Can you pre-create the folder structure and see if that works?
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

stlhostAuthor Commented:
Same error.
NVITEnd-user supportCommented:
Are you running it via a gpp as Jack mentioned, or via a logon script gpo?
stlhostAuthor Commented:
Just from logon script. if I run it from the command line I get the error.
NVITEnd-user supportCommented:
> 2015/05/27 07:44:53 ERROR 267 (0x0000010B) Accessing Source Directory \\server1\
client\removelocaladmins.vbs\
The directory name is invalid.

>  if I run it from the command line I get the error.
From the same command line, can you see or copy files from the share noted by the error? e.g.
copy \\server1\client\removelocaladmins.vbs "%temp%"

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stlhostAuthor Commented:
That works. Thanks
NVITEnd-user supportCommented:
Glad it worked out, stlhost. Have a good day...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.