[PowerShell] windows下通过bat批处理代码读取当前系统的国家设置 →→→→→进入此内容的聊天室

来自 , 2020-11-06, 写在 PowerShell, 查看 163 次.
URL http://www.code666.cn/view/7c39a5f9
  1. @ECHO OFF
  2. :: Country.bat,  Version 4.00
  3. :: Read the country name from the registry and store
  4. :: the value in an environment variable "Country"
  5. ::
  6. :: Usage:  COUNTRY
  7. ::
  8. :: Written by Rob van der Woude
  9. :: http://www.robvanderwoude.com
  10.  
  11. :: Command for ancient versions of REG.EXE
  12. FOR /F "tokens=2*" %%A IN ('REG QUERY "HKCU\Control Panel\International\sCountry"    2^>NUL') DO SET Country=%%B
  13. :: Command for more recent versions of REG.EXE
  14. FOR /F "tokens=2*" %%A IN ('REG QUERY "HKCU\Control Panel\International" /v sCountry 2^>NUL') DO SET Country=%%B
  15. ECHO Country=%Country%
  16. //shell/7318

回复 "windows下通过bat批处理代码读取当前系统的国家设置"

这儿你可以回复上面这条便签

captcha