Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a cmd-line solution to stop a Windows driver that I had installed manually.

The installing procedure was the following:

sc create MyDrv type= kernel start= demand binPath= "C:\MyDrv.sys"
net start MyDrv

Querying info on the driver outputs:

C:\>sc query MyDrv

        TYPE               : 1  KERNEL_DRIVER
        STATE              : 4  RUNNING
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

The NOT_STOPPABLE flag seems like a huge indicator that what I'm trying to accomplish can't be done. However, this driver belongs to a application that manages to stop and remove it when I uninstall the application from my PC. So, is there any way I can kill this bastard? (I don't have the source code of the driver, unfortunately).

If you are wondering, yes I tried:

C:\>net stop MyDrv
The requested pause or stop is not valid for this service.
More help is available by typing NET HELPMSG 2191.
share|improve this question

it is an actual driver not a service
You can disable/enable it in the device manager without problems
You could probably use "Devcon" to disable and enable it in batches and cmd prompts.
If it is a service then it is good to know the actual service name, as seen in the properties for the service.
Services with drivers , disabling the driver might occur easier than disabling the service.

sorry I got confused by the code :-) This thing sounds like a real stickey one, which might require setting something different in the registry for it , or understanding it much better than my post here.
Finding devcon proper for 64bit isnt easy, and the wrong versions for the OS or the Bits do not work at all, so if you try devcon, you must have the right one for the exact system, which you did not reveal.

Is it really called Mydrv? because it might help to know any actual name or product , obfusticating(sp) the driver for the purpose of getting answers is probably not usefull here.

share|improve this answer

The app that installed it is probably calling a special function in the driver or sending it a carefully crafted message to tell it to shut down gracefully.

share|improve this answer

You must log in to answer this question.

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