To disable mouse acceleration using PowerShell, you can use the following script.
!Changing registry settings via PowerShell script will affect all pointing devices that use those settings!
This script changes registry settings to disable mouse acceleration:
- Open Notepad and paste the code below:
New-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseSpeed" -Value "0" -PropertyType String -Force
New-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseThreshold1" -Value "0" -PropertyType String -Force
New-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseThreshold2" -Value "0" -PropertyType String -Force
This PowerShell script does the following:
Registry path :
-Path "HKCU:\Control Panel\Mouse"
Specifies the location in the registry where the property will be added or modified. In this case, it is the registry key for the mouse settings in the current user profile (HKCU - HKEY_CURRENT_USER).Property name :
-Name
specifies the name of the new property that will be added or modified. In this case, it is "MouseSpeed" , "MouseThreshold1" , "MouseThreshold2"Property Value :
-Value "0"
Sets the value of this property to “0”. This value can affect mouse speed, but the exact meaning depends on the context of the system settings.Property Type :
-PropertyType String
Specifies the data type of the property as a String.Force :
-Force
Forces the operation to be performed even if the property already exists. If the property "MouseSpeed" , "MouseThreshold1" , "MouseThreshold2" already exists, the value will be overwritten.
Save the file with the extension
.ps1
, for exampleDisableMouseAcceleration.ps1
.Launch PowerShell as administrator and execute the saved script by typing:
.\DisableMouseAcceleration.ps1
This script will set the "MouseSpeed" , "MouseThreshold1" , "MouseThreshold2" values , which will disable mouse acceleration.
Comments
Post a Comment