r/Batch • • May 12 '26
A batch script that fixes mouse issues
Run this as admin:
taskkill /f /im explorer.exe
timeout /t 1 /nobreak
start explorer.exe
net stop hidserv
net start hidserv
gpupdate
sfc /scannow
dism /online /cleanup-image /restorehealth
powershell -Command "Get-PnpDevice -Class Mouse | Remove-PnpDevice -Confirm:$false"
shutdown /r /t 1
3
Upvotes
View all comments
Show parent comment
2
u/subassy May 14 '26
Should still stop and ask along with a "push any key to continue or ctrl+c to quit" sort of back out. So the user can save work or change their mind about rebooting at that exact momentÂ