查看多系统版本位数
本帖最后由 807979023 于 2018-10-29 19:38 编辑查看多系统版本位数,可在正常系统或pe中运行。
@echo off
color 1f
echo.
echo.
echo 查看多系统版本位数:
echo.
setlocal enabledelayedexpansion
for %%i in (C D E F G H I J K L M N O P Q R S T U V W) do (
if exist "%%i:\Windows\explorer.exe" (
if /i not exist "%%i:\windows\syswow64" (
set vx=x86
) else (
set vx=x64
)
echo.
set vc=0
set load=0
if exist "%%i:\Windows\System32\winload.exe" set load=1
if exist "%%i:\Windows\System32\boot\winload.exe" set load=1
if "!load!" == "0" (
if exist "%%i:\Windows\WinSxs\*.3790.*" echo %%i盘 win2003 !vx! && set vc=1
if not exist "%%i:\Windows\WinSxs\*.3790.*" echo %%i盘 winxp !vx! && set vc=1
)
if exist "%%i:\Windows\WinSxs\*.7600.*" echo %%i盘 win7 !vx! && set vc=1
if exist "%%i:\Windows\WinSxs\*.9200.*" echo %%i盘 win8 !vx! && set vc=1
if exist "%%i:\Windows\WinSxs\*.9600.*" echo %%i盘 win8.1 !vx! && set vc=1
if "!vc!" == "0" echo %%i盘 win10 !vx!
)
)
for /f "tokens=1* delims=[" %%a in ('ver') do set b=%%b
set b=%b:* =%
set b=%b:~0,3%
if /i not exist "%windir%\syswow64" (
set d=x86
) else (
set d=x64
)
if /i %SystemDrive% == x: (
echo.
if "%b%" == "5.1" echo x盘 winxp %d%
if "%b%" == "5.2" echo x盘 win2003 %d%
if "%b%" == "6.1" echo x盘 win7 %d%
if "%b%" == "6.2" echo x盘 win8 %d%
if "%b%" == "6.3" echo x盘 win8.1 %d%
if "%b%" == "10." echo x盘 win10 %d%
)
pause >nul 感谢分享,位数没错,操作系统检测不对! dhlxtynz 发表于 2018-10-28 17:51
感谢分享,位数没错,操作系统检测不对!
已修改,再试-下。 在任意一个分区新建一个空白的Windows文件夹,就会被判断为winxp x86... if exist "%%i:\Windows" ( 已改为 if exist "%%i:\Windows\explorer.exe" ( 挂载注册表判断,论坛有现成的。 感谢分享, 谢谢分享 頂,謝謝樓主的勞動和分享!數據會記錄每個信息對網絡的奉獻!
页:
[1]