1

I'm trying to stop the service mshidkmdf, but it won't stop despite the fact it's STOPPABLE. I'm able to stop the driver from device manager (the device stack is \Driver\mshidkmdf and the description is HID-compliant touch screen). When I run sc query mshidkmdf, I get:

SERVICE_NAME: mshidkmdf
        TYPE               : 1  KERNEL_DRIVER
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

which implies that the service is STOPPABLE. But, when I run sc stop mshidkmdf, I get:

[SC] ControlService FAILED 1052: 

The requested control is not valid for this service.

and when I run net stop mshidkmdf, I get:

The requested pause, continue, or stop is not valid for this service.

More help is available by typing NET HELPMSG 2191.

I know the service is running because a) my touch screen is running and b) when I run sc start mshidkmdf, I get:

[SC] StartService FAILED 1056:

An instance of the service is already running.

My goal is to stop the device (my touch screen) that is run by the driver through the command line, but as far as I understand the driver and the service are the same thing.

3
  • A service and driver are NEVER the same thing. At least to windows. Nov 20, 2019 at 21:32
  • @SeñorCMasMas That's not really true. A driver is a type of service, a driver is a service of type SERVICE_KERNEL_DRIVER, SERVICE_FILESYSTEM_DRIVER, etc. What we commonly call services are actually non-driver services, of types SERVICE_WIN32_OWN_PROCESS, SERVICE_WIN32_SHARE_PROCESS, etc. The GUI hides the fact that drivers are type of service, but at the API level it becomes quite clear that they are. Jan 26, 2021 at 9:24
  • @SeñorCMasMas Driver services live in the kernel. Non-driver services do not live in the kernel. That's Microsoft's official terminology: "The service control manager (SCM) maintains a database of installed services and driver services..." I am only talking about NT/2000/XP/Vista/7/8/10 here; the SCM component doesn't exist in 9x/Me. Jan 26, 2021 at 18:24

1 Answer 1

1

This service is for Windows Touch, and Windows indeed refuses to disable it.

You might do better to disable the device itself, as explained in the Microsoft article
Enable and disable your touchscreen in Windows 10.

The procedure is:

  • Run Device Manager
  • Open Human Interface Devices
  • Select the device "HID-compliant touch screen" (there may be more than one)
  • Click Action > Disable device. For enabling, select Enable device.
2
  • Is there a way to disable the device through command line somehow? I was trying to create a batch file to enable and disable the device without having to go to device manager. Perhaps there's a way to access device manager from command line?
    – Brandon
    Nov 20, 2019 at 18:55
  • You could use devcon for that. See this answer.
    – harrymc
    Nov 20, 2019 at 19:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .