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
  • Maybe this. https://autohotkey.com/board/topic/101948-device-touchscreen-disablerenabler/ – Moab Mar 10 '16 at 01:13
  • Does it have to be a script? Would you be opposed to a freeware tool that can do the same thing from the command line? – BrianC Mar 10 '16 at 01:29
  • @BrianC: If you mean "by the command line" that I have to use it through the command line, then no. I want to essentially click on an icon to turn on and off (in this case, two icons in order to open a notepad file). Really, what I am seeking is the proper registry key and variable to set, since I can follow the example to create my own. I just need the right location to enable/disable in the registry. – ScottS Mar 10 '16 at 17:07
  • I don't think the examples in the page you linked will actually achieve this. I have no reason to believe that the registry entries for enabling the device as described there are for anything other than startup. I don't think you can use them to immediately enable/disable a device. – Ouroborus Mar 10 '16 at 17:38
  • You can find your exact answer with described steps :https://winaero.com/blog/enable-or-disable-touch-by-finger-in-windows-10/ – Ishan Shah Jun 10 '20 at 05:29

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
  • 8,704
  • 1
  • 15
  • 28
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,792
  • 2
  • 15
  • 32