@echo off
for /f "skip=4 delims=" %%s in ('reg query "HKEY_CURRENT_USER\Control Panel" /v opened') do set a=%%s
if "%a:~-1,1%"=="1" start A.exe
if "%a:~-1,1%"=="2" start B.exe
if "%a:~-1,1%"=="3" start c.exe
pause
这是在别的地方看到的一个例子
现在想 判断一个注册表位置
根据数值修改
@echo off
for /f "skip=4 delims=" %%s in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v Start Page') do set a=%%s
if "%a:~-1,1%"=="http://www.xxx.com/" start ***
if "%a:~-1,1%"=="2" start B.exe
pause
提示
错误:命令行参数太多
此时不应有start。
我现在想达到的目的就是 好比 Start Page
如果是
http://www.999.com/
直接推出
是
http://www.xxx.com/
就把
http://www.xxx.com/改为
http://www.yyy.com/
如果是
http://www.ooo.com/ 改为
http://www.ppp.com/
如果以上都不是 也退出
其中
http://www.999.com/ 这类地址没有规律 需要在批处理中指定
谢谢 麻烦大家了
Last edited by lzymbz on 2009-5-20 at 11:28 ]