Created
January 10, 2021 19:03
-
-
Save mvidaldp/630b5085e7ffcbdc5fedc49aa27dd2d7 to your computer and use it in GitHub Desktop.
Disable/enable (toggle) touch screen on Windows using Batch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Make sure you run the script with admin rights or it won't work | |
devcon find *hid\vid* | findstr "touch screen" > device_id.txt | |
set /p device=<device_id.txt | |
set "touchscreenid=%device:~0,33%" | |
devcon status "%touchscreenid%" | findstr "running" | |
if %errorlevel% == 0 ( | |
devcon disable "%touchscreenid%" | |
) else ( | |
devcon enable "%touchscreenid%" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment