File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11@ echo off
2+ setlocal EnableDelayedExpansion
3+
24cd /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
310tabletdrivercleanup.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+
440pause
You can’t perform that action at this time.
0 commit comments