Copying files from shared drive to workstations using GPO


I have a 2 ink files (price.ini & task.ini) on a windows 2012 shared drive and this was set by my predecessors. I would like to copy these ini files to different two locations on the network PCs.

The current syntax on the login script is
With FS
      '.CopyFile "\\FileSVR-a\MKT\MKTFiles\price.ini", "C:\WINDOWS\", True
      .CopyFile "\\FileSVR-b\MKT\MKTFiles\task.ini", "C:\Program Files\SharkFiles\Shark\", True

Will it be good to do this on a login script or through GPO?

If GPO is best way to do, I would like the file to be copied only once on the PC. If the file is copied , i don’t want the GPO to be applied again.

If so please post me tutorial to set up this.

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.

Cliff GaliherCommented:
The P on GPO stands for policies. Policies are exactly that; they are intended to always be applied... Like a dress code policy in most businesses.

You can write fairly elaborate scripts to handle this, but it is rarely effective and can really cause issues if they fail... Especially if they only fail on some machines. Then you end up making the script even MORE elaborate to not redeploy to existing machines  but to catch and fix problems on the failed machines.

If this is a one time deal as you suggest, touching each machine, or a server side script (not login or GPO) is a better option. Domain joined machines can have fuels copied to them via admin shares in a default configuration after all.  No need it run the copy process from the client at all.
instead of script you should use GPO preferences to copy .ini files on workstations in *update* mode
This will ensure that if file exists on workstations, it won't copy again
Shaun VermaakTechnical SpecialistCommented:
You can use GPO file preferences as per #a42512321 or GPO INI file preferences which can directly interact with INI files sections and properties

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
VB Script

From novice to tech pro — start learning today.