Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build/
dist/

# Generated by Cargo
# will have compiled files and executables
Expand Down
11 changes: 8 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
cargo build --release
if (Test-Path ./build) {
Remove-Item -Path ./build -Recurse
Remove-Item -Path ./build/* -Recurse
} else {
New-Item -Path ./build -ItemType directory > $null
}
if (Test-Path ./dist) {
Remove-Item -Path ./dist/* -Recurse
} else {
New-Item -Path ./dist -ItemType directory > $null
}
New-Item -Path ./build -ItemType directory > $null
New-Item -Path ./dist -ItemType directory > $null
Copy-Item -Path ./target/release/tabletdrivercleanup.exe -Destination ./build
Copy-Item -Path ./eng/dump.bat -Destination ./build
Copy-Item -Path ./eng/dry_run.bat -Destination ./build
Expand Down
6 changes: 3 additions & 3 deletions eng/dump.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ tabletdrivercleanup.exe --dump
pnputil /enum-drivers > .\dumps\pnputil_drivers.txt
pnputil /enum-devices /connected /drivers > .\dumps\pnputil_devices.txt

md .\dumps\DriverStore
mkdir ".\dumps\DriverStore" 2>nul

for /D %%G in ("C:\Windows\System32\DriverStore\FileRepository\*") DO (
md .\dumps\DriverStore\%%~nxG
mkdir ".\dumps\DriverStore\%%~nxG" 2>nul
for /F %%H in ("%%~G\*.inf") DO (
xcopy /Q /Y "%%H" .\dumps\DriverStore\%%~nxG > nul
xcopy /Q /Y "%%~H" ".\dumps\DriverStore\%%~nxG" >nul
<nul set /p "=Dumped '%%~nxH' !CR!"
)
)
Expand Down