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?
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!
0
stlhostAuthor Commented:
------------------------------------------------------------------------------

2015/05/27 07:44:53 ERROR 267 (0x0000010B) Accessing Source Directory \\server1\
client\removelocaladmins.vbs\
The directory name is invalid.
0
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?
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

stlhostAuthor Commented:
Same error.
0
NVITCommented:
Are you running it via a gpp as Jack mentioned, or via a logon script gpo?
0
stlhostAuthor Commented:
Just from logon script. if I run it from the command line I get the error.
0
NVITCommented:
> 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

0

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
0
NVITCommented:
Glad it worked out, stlhost. Have a good day...
0
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.

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.