9
I did a google search and found tools like devcon and devmanview but they are only useful to disable/enable the device not the device driver. What I want to do is be able to disable/enable a particular device driver via command line. Anybody know any tool which can help me do this?
In my case, I actually want to disable/enable a Nvme Mass storage device driver.
Update- I tried using the sc.exe suggested, but I didn't succeed in stopping the driver. Any help?
C:\Users\Administrator>sc query nvme
SERVICE_NAME: nvme
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
C:\Users\Administrator>sc stop nvme [SC] ControlService FAILED 1052:
The requested control is not valid for this service.
What is Windows 2012? – DavidPostill – 2016-02-16T23:10:37.130
I meant Windows Server 2012 https://www.microsoft.com/en-us/server-cloud/products/windows-server-2012-r2/Overview.aspx
– kate – 2016-02-16T23:15:28.180Fixed it for you. We don't need version in the title, I fixed the tags ;) – DavidPostill – 2016-02-16T23:17:20.313
I don't think you can enable/disable drivers only devices. What are you actually trying to achieve? – DavidPostill – 2016-02-16T23:20:24.117
1@DavidPostill Actually, some drivers can be stopped (even file system drivers!) - Kate, what's the output of
sc queryex type= driver | findstr /i service_name
(all literal); is the desired driver in there? – Ben N – 2016-02-16T23:22:09.483@BenN I did that and I have a long list of service names, how can i map these service names to the driver I want to manipulate? Any help? – kate – 2016-02-16T23:51:30.160
@BenN I think I found it! :) Missed it the first time! its just 'nvme'! :) – kate – 2016-02-16T23:54:13.627
@DavidPostill I am trying to reset the nvme drive, specifically issue a controller reset by disabling/re-enabling the driver! – kate – 2016-02-16T23:57:27.000