[英]Windows 7: Set “Copy Settings” programmatically from a batch file
I'm constructing a batch file that will auto-configure Windows 7's regional settings for all users. 我正在构建一个批处理文件,该文件将为所有用户自动配置Windows 7的区域设置。
So far, I've successfully been able to set (mostly) all of the regional settings for the current user, but I need to be able to apply the same settings to all new users. 到目前为止,我已经能够成功(几乎)为当前用户设置所有区域设置,但是我需要能够将相同设置应用于所有新用户。 You can do this via the GUI, by going into
Region and Language > Administrative > Copy Settings
and selecting both checkboxes. 您可以通过GUI进入
Region and Language > Administrative > Copy Settings
然后选中两个复选框,以进行此操作。 I would like to do this programmatically, though. 不过,我想以编程方式执行此操作。 Does anyone know of a registry key I can set or something that will do this?
有人知道我可以设置的注册表项吗?
Failing that, I'll settle for a way to programmatically open the Region and Language > Administrative > Copy Settings
window. 否则,我将寻找一种以编程方式打开“
Region and Language > Administrative > Copy Settings
窗口的方法。 I've been able to successfully open the Region and Language > Administrative
window with start rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,3
, but I would like to eliminate one more step from the process, if possible. 我已经能够通过
start rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,3
成功地打开“ Region and Language > Administrative
窗口,但如果可能的话,我想从此过程中省去一步。
Update 更新资料
Sorry, I seem to have forgotten to mention how I'm applying these settings. 抱歉,我似乎忘了提及我如何应用这些设置。 I'm doing this by executing an exported
.reg
file, that contains the optimal settings, with regedit.exe /s "regional.reg"
我通过使用
regedit.exe /s "regional.reg"
执行包含最佳设置的导出.reg
文件来完成此操作
How are you applying the settings now? 您现在如何应用设置? Via the registry?
通过注册表?
If you put the settings under HKEY_USERS\\.DEFAULT
instead of (or in addition to) HKEY_CURRENT_USER
, they should be used during profile creation. 如果将设置放在
HKEY_USERS\\.DEFAULT
之下(而不是HKEY_CURRENT_USER
之下),则应在配置文件创建过程中使用它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.