.bat file to remove unused drivers files and more
This is the code for the .bat file to clean DriverStore folder in Windows
@echo off
for /L %%A in (1,1,300) do (
echo Deleting OEM%%A.INF
pnputil /d OEM%%A.INF
)
Clean the WinSxS folder, run these command in cmd (Admin)
Dism.exe /online /Cleanup-Image /StartComponentCleanup
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
Dism.exe /online /Cleanup-Image /SPSuperseded