批处理如何查看驱动版本?
下面的批处理不通用,不同的系统注册表位置不相同。- @echo off&color 1f&echo.
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000" /v "DriverDesc"') do set aDriverDesc=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000" /v "DriverVersion"') do set aDriverVersion=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000" /v "DriverDate"') do set aDriverDate=%%j
- echo.
- echo 显卡名称: %aDriverDesc%
- echo 驱动版本: %aDriverVersion%
- echo 驱动日期: %aDriverDate%
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-BFC1-08002be10318}\0000" /v "DriverDesc"') do set aDriverDesc=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000" /v "DriverVersion"') do set aDriverVersion=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000" /v "DriverDate"') do set aDriverDate=%%j
- echo.
- echo 声卡名称: %aDriverDesc%
- echo 驱动版本: %aDriverVersion%
- echo 驱动日期: %aDriverDate%
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0009" /v "DriverDesc"') do set aDriverDesc=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0009" /v "DriverVersion"') do set aDriverVersion=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0009" /v "DriverDate"') do set aDriverDate=%%j
- echo.
- echo 网卡名称: %aDriverDesc%
- echo 驱动版本: %aDriverVersion%
- echo 驱动日期: %aDriverDate%
- echo.&echo 按任意键退出...&pause >nul
复制代码
- @echo off&color 1f&echo.
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000" /v "DriverDesc"') do set aDriverDesc=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000" /v "DriverVersion"') do set aDriverVersion=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000" /v "DriverDate"') do set aDriverDate=%%j
- echo 显卡名称: %aDriverDesc%
- echo 驱动版本: %aDriverVersion%
- echo 驱动日期: %aDriverDate%
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-BFC1-08002be10318}\0000" /v "DriverDesc"') do set aDriverDesc=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000" /v "DriverVersion"') do set aDriverVersion=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000" /v "DriverDate"') do set aDriverDate=%%j
- echo.
- echo 声卡名称: %aDriverDesc%
- echo 驱动版本: %aDriverVersion%
- echo 驱动日期: %aDriverDate%
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0000" /v "DriverDesc"') do set aDriverDesc=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0000" /v "DriverVersion"') do set aDriverVersion=%%j
- for /f "tokens=2,*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0000" /v "DriverDate"') do set aDriverDate=%%j
- echo.
- echo 网卡名称: %aDriverDesc%
- echo 驱动版本: %aDriverVersion%
- echo 驱动日期: %aDriverDate%
- echo.&echo 按任意键退出...&pause >nul
复制代码
|