diff --git a/eng/dump.bat b/eng/dump.bat index d02a485..7d0ab5c 100644 --- a/eng/dump.bat +++ b/eng/dump.bat @@ -1,4 +1,40 @@ @echo off +setlocal EnableDelayedExpansion + cd /D "%~dp0" + +:: Define CR to contain a carriage return (0x0D) +for /f %%A in ('copy /Z "%~dpf0" nul') do set "CR=%%A" + +:: Dump tabletdrivercleanup.exe --dump +pnputil /enum-drivers > .\dumps\pnputil_drivers.txt +pnputil /enum-devices /connected /drivers > .\dumps\pnputil_devices.txt + +md .\dumps\DriverStore + +for /D %%G in ("C:\Windows\System32\DriverStore\FileRepository\*") DO ( + md .\dumps\DriverStore\%%~nxG + for /F %%H in ("%%~G\*.inf") DO ( + xcopy /Q /Y "%%H" .\dumps\DriverStore\%%~nxG > nul +