I have recently gotten a mouse for my laptop, though the mouse acceleration is really bugging me. Since this is a managed school device, I do not have access to any elevated prompts, settings app, control panel, device manager, cmd prompt, or regedit, but I do have access to Powershell. I use my trackpad a lot too, so I would prefer if mouse acceleration were switching on and off depending on if my mouse was in use. Any help is appreciated!
I’ve taken a look online and saw solutions that used C++ to interact with the Windows API, but I wasn’t fully sure what I would need to do that, especially due to the fact that upon looking it up, it would require admin privileges in some scenarios, while being available to base users in other scenarios
Max Heppelmann is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
To disable mouse acceleration using PowerShell, you can use the following script. This script changes the registry settings to disable mouse acceleration:
- Open Notepad and paste the following code:
New-ItemProperty -Path "HKCU:Control PanelMouse" -Name "MouseSpeed" -Value "0" -PropertyType String -Force
New-ItemProperty -Path "HKCU:Control PanelMouse" -Name "MouseThreshold1" -Value "0" -PropertyType String -Force
New-ItemProperty -Path "HKCU:Control PanelMouse" -Name "MouseThreshold2" -Value "0" -PropertyType String -Force
-
Save the file with a
.ps1
extension, for example,DisableMouseAcceleration.ps1
. -
Run PowerShell as an administrator and execute the saved script by typing:
.DisableMouseAcceleration.ps1
This script will set the values of MouseSpeed
, MouseThreshold1
, and MouseThreshold2
to 0
, which will disable mouse acceleration.
2