Skip to content

Commit b0cbe25

Browse files
committed
feat: dump more information and zip it
1 parent 7619346 commit b0cbe25

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

eng/dump.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,40 @@
11
@echo off
2+
setlocal EnableDelayedExpansion
3+
24
cd /D "%~dp0"
5+
6+
:: Define CR to contain a carriage return (0x0D)
7+
for /f %%A in ('copy /Z "%~dpf0" nul') do set "CR=%%A"
8+
9+
:: Dump
310
tabletdrivercleanup.exe --dump
11+
pnputil /enum-drivers > .\dumps\pnputil_drivers.txt
12+
pnputil /enum-devices /connected /drivers > .\dumps\pnputil_devices.txt
13+
14+
md .\dumps\DriverStore
15+
16+
for /D %%G in ("C:\Windows\System32\DriverStore\FileRepository\*") DO (
17+
md .\dumps\DriverStore\%%~nxG
18+
for /F %%H in ("%%~G\*.inf") DO (
19+
xcopy /Q /Y "%%H" .\dumps\DriverStore\%%~nxG > nul
20+
<nul set /p "=Dumped '%%~nxH' !CR!"
21+
)
22+
)
23+
24+
<nul set /p "=Dumped INF files !CR!"
25+
26+
echo Dumped INF files
27+
28+
set "srcDir=.\dumps"
29+
set "destZip=.\dumps.zip"
30+
31+
if exist "%destZip%" del "%destZip%"
32+
33+
powershell -nologo -noprofile -command "& { Compress-Archive -Path '%srcDir%' -DestinationPath '%destZip%' }"
34+
35+
echo Created '%destZip%'
36+
rd /s /q .\dumps
37+
38+
echo Done
39+
440
pause

0 commit comments

Comments
 (0)