Skip to content

Instantly share code, notes, and snippets.

@marckassay
Last active September 8, 2019 22:24
Show Gist options
  • Save marckassay/174d2217e354734a5c63ccb22c5fcb76 to your computer and use it in GitHub Desktop.
Save marckassay/174d2217e354734a5c63ccb22c5fcb76 to your computer and use it in GitHub Desktop.
PowerShell script to disable an Elantech TouchPad on WIndows 10. This TouchPad is available on at least Samsung Series 7 Chronos laptops
<#
.SYNOPSIS
Disables Elantech TouchPad on WIndows 10
.DESCRIPTION
This TouchPad is available on at least Samsung Series 7 Chronos laptops. Executing this function will edit the registry. Afterwards in order for this function to have
an effect, at minimum a system log-off is required.
This function doesn't disable TouchPad on Windows log-in screen.
.PARAMETER WhatIf
Dry-run; outputs what it intends to do if executed without `-WhatIf`
.EXAMPLE
C:\> (New-Object Net.WebClient).DownloadString("https://gist.githubusercontent.com/marckassay/174d2217e354734a5c63ccb22c5fcb76/raw/5104dad7a89dfb9ac8f74de0bb96bf4b4fb51f04/Disable-ElantechTouchPad.ps1") | iex
C:\> Disable-ElantechTouchPad -WhatIf
.EXAMPLE
C:\> Disable-ElantechTouchPad
#>
function Disable-ElantechTouchPad {
[CmdletBinding()]
Param
(
[switch]$WhatIf
)
Get-Item -Path HKCU:\Software\Elantech\OtherSetting\ | Set-ItemProperty -Name DisableWhenDetectUSBMouse -Value 1 -WhatIf:$WhatIf.IsPresent
Get-Item -Path HKCU:\Software\Elantech\OtherSetting\ | Set-ItemProperty -Name IsUsbMousePlugIn -Value 1 -WhatIf:$WhatIf.IsPresent
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment