批处理BAT/CMD智能判断操作系统是Windows 10 Windows 8 Windows 7 Windows Vista Windows XP Windows 2000
根据Windows版本号判断Windows操作系统版本。Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8/8.1
Windows 10
- @echo off
- title 系统版本信息--www.51-n.com
- color e9
- %windir%\system32\mode.com con cols=48 lines=5 >nul 2>nul
- ver | find "5.0">NUL && IF errorlevel 0 Set XC=2000
- ver | find "5.1">NUL && IF errorlevel 0 Set XC=XP.3
- ver | find "6.0">NUL && IF errorlevel 0 Set XC=Vista
- ver | find "6.1">NUL && IF errorlevel 0 Set XC=7
- ver | find "6.2">NUL && IF errorlevel 0 Set XC=8
- ver | find "6.3">NUL && IF errorlevel 0 Set XC=8.1
- ver | find "10" >NUL && IF errorlevel 0 Set XC=10
- cls
- echo.
- echo 当前操作系统为Windows %XC%.
- pause>nul
复制代码
|
|