@echo off
setlocal enabledelayedexpansion 

.\devcon.exe driverfiles ACPI\WDT0001 > drvlst.txt

set key=

for /f "tokens=4 delims=\[" %%i in ('findstr /r "oem[0-9]*.inf" drvlst.txt') do (
set key=%%i
)
::echo key=!key!
if "%key%"=="" goto end

:remove
.\devcon.exe rescan
.\devcon.exe remove ACPI\WDT0001
.\devcon.exe -f dp_delete %key% 
.\devcon.exe rescan

:end
del drvlst.txt


