本帖最后由 apang 于 2014-12-13 22:48 编辑
回复 8# sinun
你用的什么系统啊?难道不支持findstr ?
老老实实用 for,试试- @echo off
- for %%a in (041E 0409 1401 3C01 0C01 1C01 0439) do set "_0000%%a=1"
- set "key=HKCU\Control Panel\International"
- for /f "tokens=1,3" %%a in ('reg query "%key%" /v Locale') do (
- if /i "%%a" == "Locale" (
- if defined _%%b (goto :LocaleOK) else goto :LocaleNG
- )
- )
- echo,指定的注册表项或值不存在
- pause & exit /b
-
- :LocaleOK
- echo,找到了
- pause&exit
-
- :LocaleNG
- echo,没找到
- pause
复制代码
|