- 帖子
- 46
- 积分
- 72
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2012-5-10
|
改了一句,好像可以了.
@echo off&color 1f&echo.
setlocal enabledelayedexpansion
set "$5.1.26=winXP "
set "$6.1.76=win7 "
set "$6.2.92=win8 "
set "$6.3.96=win8.1"
set "$10.0.1=win10 "
set "$10.0.2=wind11"
:: 遍历磁盘,确定盘符占用,并返回系统版本
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:\ (
if exist "%%a:\windows\system32\version.dll" (
if /i not exist "%%a:\windows\syswow64" (set vx=x32)else (set vx=x64)
for /f "tokens=2 delims==" %%b in ('wmic datafile where Name^="%%a:\\Windows\\System32\\version.dll" get Version /value') do (
set "tmp=%%b"
set "x=!tmp:~0,6!"
call set "xx=%%$!x!%%"
set pf=%%a
echo !pf!盘 !xx! !vx!
)
)
)
)
echo.&echo 按任意键退出...&pause >nul&exit |
|