- @echo off
- pushd "%~dp0\"
- SetLocal EnableDelayedExpansion
-
- set Adapter="NVIDIA nForce Networking Controller"
- rem 你的网络设备名称
-
- set Fullkey="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class"
-
- echo.正在导出注册表文件...
- regedit.exe /e %temp%\clsid.reg %Fullkey%
-
- echo.正在分析注册表文件...
- for /f "delims=:" %%a in ('Type "%temp%\clsid.reg" ^| findstr /ni /c:%Adapter%') do (
- for /l %%i in (100,-1,1) do (
- set /a Line = %%a - %%i
- for /f "tokens=2 delims=:" %%b in ('Type "%temp%\clsid.reg" ^| findstr /n .* ^| findstr /b !Line!:') do (
-
- echo.%%b | findstr /i %Fullkey% >nul 2>nul
- if !errorlevel! == 0 set CLSID=%%b
- )
- )
- )
-
- ECHO.%CLSID:~1,-1%
- erase "%temp%\clsid.reg"
- echo.按任意键退出...
- pause >nul
复制代码
|