简体   繁体   中英

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.

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. 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. 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.

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"

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM