[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
回复 1# dong3626
  1. @echo off
  2. setlocal enabledelayedexpansion
  3. set "$5.1.26=WinXP"
  4. set "$5.2.00=WinXP 64       "
  5. set "$6.0.60=Vista /S2008   "
  6. set "$6.1.76=Win7  /S2008 R2"
  7. set "$6.2.92=Win8  /S2012   "
  8. set "$6.3.96=Win8.1/S2012R2 "
  9. set "$10.0.1=Win10 /S2016-9 "
  10. set "$10.0.2=Wind11/S2022   "
  11. REM 遍历磁盘,确定盘符占用,并返回系统版本
  12. for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
  13.     if exist "%%a:\windows\system32\version.dll" (
  14.         echo %%a
  15.         for /f "tokens=2 delims==" %%b in ('wmic datafile where Name^="%%a:\\Windows\\explorer.exe" get Version /value') do (
  16.             echo,%%b
  17.             set "tmp=%%b"
  18.             set "x=!tmp:~0,6!"
  19.             call set "xx=%%$!x!%%"
  20.         )
  21.         for /f "tokens=2 delims==" %%b in ('wmic datafile where Name^="%%a:\\Windows\\System32\\version.dll" get Version /value') do (
  22.             echo,%%b
  23.         )
  24.         if exist "%%a:\boot\memtest.ext" (
  25.             echo BIOS
  26.         ) else (
  27.             echo UEFI
  28.         )
  29.     )
  30. )
  31. echo,!x!
  32. echo,!xx!
  33. pause
复制代码
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

回复 3# dong3626


批处理中的变量嵌套
http://bbs.bathome.net/thread-2899-1-1.html
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

返回列表