No announcement yet.

Copying Files by GPO

  • Filter
  • Time
  • Show
Clear All
new posts

  • Copying Files by GPO

    I wasn’t sure if this goes in here or the scripting forum so sorry if it in the wrong place.

    I've enabled some wallpaper via GPO which currently reads from a UNC path on the file server.

    I now want to run a batch file to copy this file locally to all the computers / laptops so its not hammering the network with the file being open by everyone etc etc..

    I tried an xcopy command in the Machine Startup scripts part of a GPO to copy the JPEG from the file server to C:\WINDOWS\Web\Wallpaper but it aint working.

    I think this is because the Wallpaper folder was read only. I made the folder writable to the "Users" group & it worked.

    So my question is how would I use the xcopy batch file to copy the files to this folder?

    what privileges does a GPO use to run the scripts, I thought they would be admin level but obviously not.

    Is there a way to run the xcopy bat file with elevated privileges

    Or am I going about this all wrong?

  • #2
    Re: Copying Files by GPO

    What AD do you have? Have you considered using Group Policy preferences to copy the file?


    • #3
      Re: Copying Files by GPO

      Running Server 2003 unfortunately, Ive just managed to work this out. Must have been the xcopy script I was using which was duff. Here's what I now have working in case anyone else needs this:

      I have a bat file with the following script:

      xcopy /y "\\server1\folder1\wallpaper-name.jpg" "c:\windows\web\wallpaper" /e /v /c /i /h /r

      I have GPO with the bat file in Computer Config> Windows Settings> Startup

      This coppies the wallpaper locally to the machine.

      I then have another GPO with wallpaper set to "c:\windows\web\wallpaper\wallpaper-name.jpg"
      The wallpaper GPO has loopback enabled & set to merge

      Thanks for all the help guys & I hope this bit of infor might help someone else out.