How can you edit a specific group policy using a batch file

I am working on more than 700 computers in the school district and have written a small program that I intend to burn to a CD. The program is installed on autorun when a disk is inserted, and asks for the resolution of the computer screen and the computer on which the building is located (in different school buildings). The program then runs the batch file, which copies the default desktop from the disk and into the windows \ web \ wallpaper directory. It also replaces other files that have been configured for the school district.

To finish changing the computer theme, I need the file to make several changes to Group Policy and to the registry. How can I use the program to make these changes? Will all this be written to the batch, or should the package initiate another file (for example, a registry file)?

+4
source share
2 answers

The entire Group Policy Editor sets registry keys. If you can determine which keys are set for the policy you need, you can use reg.exe to install these keys.

reg.exe add HKCU\Software\path\to\regkey\ /v valuename /d newvalue 
+3
source

The registry will work for the first user, but after a new user logs in, the GP will change these settings for the new user.

To perform a gp deployment, do the following: Install one GP of the machine the way you want it. Once you're done, go to C: \ windows \ System32 \ GroupPolicy and copy the contents. (note: this is a hidden file). On the following machines you want, just paste back into the file.

If you do this in a package, you will need to run the package as an administrator in order to touch the C: \ windows \ system32 folder. (UAC, Bane IT)

+2
source

All Articles