- @echo off
- for /f "skip=2 tokens=3 delims= " %%i in ('reg query "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v Version') do (
- for /f "tokens=1,2 delims=." %%a in ("%%i") do (
- if %%b equ 0 (set ver=%%a) else set ver=%%b
- )
- )
- echo 当前浏览器版本:Internet Explorer %ver%
- pause >nul
复制代码
- @echo off
- for /f "skip=2 tokens=1,2 delims=." %%i in ('reg query "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v Version') do (
- set str=%%i&set ver=%%j
- )
- if %ver% equ 0 set ver=%str:~-1%
- echo 当前浏览器版本:Internet Explorer %ver%
- pause >nul
复制代码
|