0

I'm working on a project where I need to sysprep a windows 7 image. I need to create a batch script to delete the existing files and sub folders inside another folder with an unknowable name located within the windows/system32/GroupPolicyUsers folder and then copy the needed user policies back into the windows/system32/GroupPolicyUsers/unkownFolderName folder and finally run gpupdate /force.

There is only a single sub folder in the /windows/system32/GroupPolicyUsers folder, but the name of that folder changes to the SID of the user after sysprep which is why I cannot know the exact name of the folder.

Inside this folder having the unknown name there is one sub folder and one file that needs to be deleted and replaced with my own folder and file.

Is this possible using a batch script?

Thanks in advance for your replies...

jwitt98
  • 1,194
  • 1
  • 16
  • 30
  • Question is not that much concrete and clear to attract users to answer it. You may like to get it short and specific. – Sunny Apr 18 '14 at 20:10
  • It seemed clear in my head at the time... ;). The problem was that I needed to copy files to the user's group policy folder. The folder is the name of the SID and changes with every sysprep install. I was able to use the solution [here](http://stackoverflow.com/a/2997161/3105890) to obtain the user's SID and thus the name of the folder I need to use in the batch script – jwitt98 Apr 24 '14 at 14:23

0 Answers0