找回密码
 新建账号

[脚本源码] 批处理 BAT 判断 Win7 Vista XP Windows 2000

[复制链接]
php 发表于 2012/4/9 16:25 | 显示全部楼层 |阅读模式
批处理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
  1. @echo off
  2. title 系统版本信息--www.51-n.com
  3. color e9
  4. %windir%\system32\mode.com con cols=48 lines=5 >nul 2>nul
  5. ver | find "5.0">NUL && IF errorlevel 0 Set XC=2000
  6. ver | find "5.1">NUL && IF errorlevel 0 Set XC=XP.3
  7. ver | find "6.0">NUL && IF errorlevel 0 Set XC=Vista
  8. ver | find "6.1">NUL && IF errorlevel 0 Set XC=7
  9. ver | find "6.2">NUL && IF errorlevel 0 Set XC=8
  10. ver | find "6.3">NUL && IF errorlevel 0 Set XC=8.1
  11. ver | find "10" >NUL && IF errorlevel 0 Set XC=10
  12. cls
  13. echo.
  14. echo 当前操作系统为Windows %XC%.
  15. pause>nul
复制代码


746266936 发表于 2012/4/14 16:05 | 显示全部楼层
看看内容
yunightoo 发表于 2012/4/20 05:41 | 显示全部楼层
顶!!
。景 发表于 2012/11/7 14:25 | 显示全部楼层
支持
342337454 发表于 2013/1/7 23:42 | 显示全部楼层
看看
wuzan2006 发表于 2016/4/13 21:34 | 显示全部楼层
看一看内容

手机版|轻松E站

GMT+8, 2024/3/29 21:15

快速回复 返回顶部 返回列表