如何使用批处理文件编辑特定的组策略 [英] How could you edit a specific group policy using a batch file

查看:696
本文介绍了如何使用批处理文件编辑特定的组策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个学区中的700多台计算机上工作,并且编写了一个我打算写到CD上的小程序.插入磁盘后,程序将设置为自动运行,并提示计算机的屏幕分辨率以及建筑物所在的计算机(不同的学校建筑物).之后,程序将运行一个批处理文件,该文件将从磁盘中复制默认桌面并复制到windows \ web \ wallpaper目录中.它还会替换为学区定制的其他文件.

Im working on over 700 computers in a school district and have written a small program that i intend to write to a cd. The program is set to autorun when the disk is inserted and prompt the screen resolution of the computer and what computer the building is in (the different school buildings). Afterwards the program will run a batch file that copies a default desktop from the disk and into the windows\web\wallpaper directory. It also replaces other files that have been customized for the school district.

要完成更改计算机主题的操作,我需要使文件对组策略和注册表进行一些编辑.我将如何使用该程序进行这些更改?是全部写入批处理还是批处理必须启动另一个文件(例如注册表文件)?

To finish changing the theme of the computer, i need to have the file make a few edits to the group policy and the registry. How would i be able to use the program to makes these changes? Would it all be written into the batch or would the batch have to initiate another file (like a registry file)?

推荐答案

组策略编辑器所做的所有工作都是设置注册表项.如果可以确定要为所需策略设置的密钥,则可以使用reg.exe设置这些密钥.

All the group policy editor does is set registry keys. If you can identify what keys are being set for the policy you want, you can use reg.exe to set those keys.

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

这篇关于如何使用批处理文件编辑特定的组策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆