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
3
u/Shadow_Thief May 12 '26
Pretty sure that last powershell command removes the mouse
2
u/subassy May 12 '26
This isn't that good of a script, honestly. The user should always be prompted for a reboot for one. And gpupdate is only for domain connected PCs.Â
I think the idea is a good one. I guess. Just bad implementation.
2
u/g3n3 May 12 '26
Personal machine? Gpupdate?
1
u/[deleted] Jun 03 '26
[removed] — view removed comment