A VBS that will copy a file from server to c:\windows\system32 on client's pc

Basically I want a command that will copy a file from a server to c:\windows\system32 on client's pc

There are 250+ pcs and I want to run a log in script from GPO.

I have asked this question a few weeks back but noone was able to help me with.  There was an issue with permission on c:\windows\system32 on local machine that prevented a file from being copied to.

thanks
cooljam23Asked:
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.

Lee W, MVPTechnology and Business Process AdvisorCommented:
What you're trying to do - must it be done with a login script?  Is the goal simply to put a file on the local PC for later use/reference?

If so, I can suggest/write alternatives for this.
0
cooljam23Author Commented:
Ok  we're trying to put a wallpaper file (bmp) on to client's pc in c:\windows\system32 and then we can set the GPO to point to c:\windows\system32\file.bmp

I don't know of any other way off copying the file from the server to c:\windows\system32 with the proper rights

Log in batch file won't do this because of the permission issues.

0
Lee W, MVPTechnology and Business Process AdvisorCommented:
A DOS command (using a few other dos commands) should be able to do this:

for /f "tokens=1" %a in ('net view ^| find "\\"') do @copy /y "\\server\share\path\source.bmp" "%a\admin$"

This relies on all workstations being visible to the "net view" command - which also means they must be booted.  As long as the script is run by an Admin, it should work fine, provided you haven't removed administrative shares on the clients.

If you want to put this into a DOS Script, make sure to double the % signs - %%a instead of %a.

You can also have a script that runs longer and records each machine successfully copied to, another version that copies by IP Address instead of computer name.
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
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
Visual Basic Classic

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.