回复 1# dong3626 - @echo off
- setlocal enabledelayedexpansion
-
- set "$5.1.26=WinXP"
- set "$5.2.00=WinXP 64 "
- set "$6.0.60=Vista /S2008 "
- set "$6.1.76=Win7 /S2008 R2"
- set "$6.2.92=Win8 /S2012 "
- set "$6.3.96=Win8.1/S2012R2 "
- set "$10.0.1=Win10 /S2016-9 "
- set "$10.0.2=Wind11/S2022 "
-
- REM 遍历磁盘,确定盘符占用,并返回系统版本
- 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 (
- if exist "%%a:\windows\system32\version.dll" (
- echo %%a
- for /f "tokens=2 delims==" %%b in ('wmic datafile where Name^="%%a:\\Windows\\explorer.exe" get Version /value') do (
- echo,%%b
- set "tmp=%%b"
- set "x=!tmp:~0,6!"
- call set "xx=%%$!x!%%"
- )
- for /f "tokens=2 delims==" %%b in ('wmic datafile where Name^="%%a:\\Windows\\System32\\version.dll" get Version /value') do (
- echo,%%b
- )
- if exist "%%a:\boot\memtest.ext" (
- echo BIOS
- ) else (
- echo UEFI
- )
- )
- )
-
- echo,!x!
- echo,!xx!
- pause
复制代码
|