Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change regional and language options in BATCH

How can I change the regional and language options in Windows XP and 7 using batch code?

I want to change the "Standards and formats" to Mexican Spanish with a .bat file.

like image 217
user3108594 Avatar asked Feb 10 '14 23:02

user3108594


People also ask

How can I change language and regional settings?

Click the Start button, and then click Control Panel. Click Clock, Language, and Region, and then click Regional and Language Options. The Regional and Language Options dialog box appears. On the Formats tab, under Current format, click Customize this format.


1 Answers

Those settings are in the registry under HKCU\Control Panel\International

You can use reg.exe to make the changes manually. The easiest way to do that is to manually change your region and language to spanish (mexico) open a cmd window and type reg query "HKCU\Control Panel\International" which will show you the values as you want them. Then to modify them, use REG ADD "HKCU\Control Panel\International" /t REG_SZ /v LocaleName /d es-Mx /f for each value replacing what is after /v with the appropriate name and what is after /d with the appropriate value.

The other option is to just export the HKCU\Control Panel\International hive to a .reg file and just import it into the registry using regedit /s ImportFile.reg

You may need to refresh the registry after the import to see the changes. This usually involves a reboot but try adding the following as the last line in your batch file instead. RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True

like image 107
Matt Williamson Avatar answered Sep 28 '22 20:09

Matt Williamson