Is there a way to enable/disable a device from a batch file or desktop link?

RU482

Lifer
Apr 9, 2000
12,689
3
81
I'm working with someone who has a Win8.1 laptop with a touchscreen. It seems that occasionally, the touchscreen goes a bit berserk and senses a constant set of touches on 2-3 points on the screen. At that point, even using the touchpad becomes a challenge.

We've discovered two work arounds....one is to put the computer to sleep, and wake it back up. The other is to go to device manager, disable the touchscreen, then re-enable it.

I was wondering if there would be a way to accomplish the disable and enable with a couple of batch files. Then, via a link on the desktop or traybar, the batch files could be run.

Any insight??

Thanks
 

lanned

Junior Member
Feb 5, 2009
1
0
0
One way is to use devcon (Device Console.) It's part of the Windows SDK and you'll have to download the correct version for the Windows version you plan to use it in.

This page tells you about it: http://msdn.microsoft.com/en-us/library/windows/hardware/ff544707(v=vs.85).aspx

Choose the Windows Hardware Downloads link which takes you to http://msdn.microsoft.com/en-us/windows/hardware/hh852365

Also one nice way to get the HW ID's - post #4 here: http://www.vistax64.com/drivers/244299-enable-disable-devices-using-batch-files.html

I don't know much about it but needed this exact capability a few yrs back, kinda worked if I remember right.

That download says Visual Studio has to be installed first, being that you just need devcon I don't know if that matters or not.