2

I know that:

  1. My Windows 10 Device manager has the "HID-compliant touch screen" hardware that I can set to "disabled" to turn off my touch screen.
  2. I can create a short script in notepad to edit the Registry of a device (see Pathusclass's answer).

But what registry key I would need to access and what value to set it to in order to make such a short cut to disable/enable my touch screen?

ScottS
  • 153
  • 1
  • 2
  • 9

2 Answers2

1

The beet way on a Windows 10 system is to use PowerShell. Get-PnpDevice and Disable-PnpDevice are the Cmdlets you'll need. You must use an Administrative PowerShell Console Window.

Get-PnpDevice returns all PNP devices:

PS C:\> Get-PnpDevice                                                                                  
Status     Class           FriendlyName
------     -----           ------------
Unknown    DiskDrive       General UDisk USB Device
OK         System          Motherboard resources
OK         System          Motherboard resources
OK         System          Motherboard resources
OK         HIDClass        HID-compliant vendor-defined device

So we narrow it down with Where-Object (alias ?):

PS C:\> Get-PnpDevice | ?{$_.FriendlyName -match 'touch screen'}                                         
Status     Class           FriendlyName
------     -----           ------------
OK         HIDClass        HID-compliant touch screen

Then we pipe it to Disable-PnpDevice:

PS C:\> Get-PnpDevice | ?{$_.friendlyname -match 'touch screen'} | Disable-PnpDevice

Confirm
Are you sure you want to perform this action?
Performing the operation "Disable" on target "Win32_PnPEntity: HID-compliant touch screen (DeviceID =
"HID\VID_04F3&PID_24E3&COL01\6&34FA9EF5&...)".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
PS C:\>

If you wish to disable without cnfirmation, use the -Confirm parameter with a value of $False:

PS C:\> Get-PnpDevice | ?{$_.FriendlyName -match 'touch screen'} | DISable-PnpDevice -Confirm:$False
PS C:\>
Keith Miller
  • 10,694
  • 1
  • 20
  • 35
0

Microsoft provides a tool, devcon.exe, that they claim can enable/disable devices from the command line (or a batch script, or a shortcut, etc.). This may allow you to do what you want (without a registry key).

Ouroborus
  • 2,850