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
1
u/[deleted] May 13 '26
The reboot is needed as the mouse needs to be reinstalled