Closed cosmoswafer closed 2 years ago
I run the mouse-natural-scroll.ps1 script on my system and it prompts the following errors:
mouse-natural-scroll.ps1
Method invocation failed because [Microsoft.Management.Infrastructure.CimInstance] does not contain a method named 'op_Addition'. At C:\Users\gamer\Downloads\mouse-natural-scroll.ps1:4 char:1 + $mouses += Get-CimInstance -ClassName Win32_PointingDevice | Where-Ob ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (op_Addition:String) [], RuntimeException + FullyQualifiedErrorId : MethodNotFound
I believe line 3 to be:
$mouses = @(Get-CimInstance -ClassName Win32_PointingDevice | Where-Object Name -Match "USB Input Device")
Seems you should declare the $mouses as an array if it only finds one result.
$mouses
https://github.com/jm33-m0/win10-mouse-natural-scroll/commit/d85cce8f6af362aa67662417c7f8a5ec0521918f
I think the "win11" script works for Windows 10 as well, consider the old script deprecated
I see. It works now. Thanks!
I run the
mouse-natural-scroll.ps1
script on my system and it prompts the following errors:I believe line 3 to be:
Seems you should declare the
$mouses
as an array if it only finds one result.