- @echo off
- for %%i 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 /i "%%i:" == "%SystemDrive%" (
- echo;%%i:
- call :xxx "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
- ) else if exist "%%i:\Windows\System32\Config\Software" (
- echo;%%i:
- reg Load HKLM\WINPE "%%i:\Windows\System32\Config\Software" >nul
- call :xxx "HKLM\WINPE\Microsoft\Windows NT\CurrentVersion"
- reg Unload HKLM\WINPE >nul
- )
- )
- pause & exit
-
- :xxx
- for /f "tokens=1,2*" %%i in ('reg query "%~1" /t REG_SZ') do (
- if /i "%%i" == "DisplayVersion" (
- echo;%%k
- ) else if /i "%%i" == "ProductName" (
- echo;%%k
- )
- )
复制代码
|