Enable/Disable device driver via command line
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Fantascape Looping
--
Chapters
00:00 Enable/Disable Device Driver Via Command Line
00:45 Accepted Answer Score 5
01:26 Answer 2 Score 0
02:00 Answer 3 Score 2
02:34 Answer 4 Score 0
02:42 Thank you
--
Full question
https://superuser.com/questions/1041773/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#commandline #drivers #windowsserver2012 #devicemanager
#avk47
ACCEPTED ANSWER
Score 5
You can use the sc.exe
utility for this.
sc query type= driver | findstr WHAT_IM_LOOKING_FOR
If you find what you're looking for, you can at stop the driver with:
sc stop EXACT_DRIVER_NAME_AS_LISTED_BY_QUERY
Obviously you'll need a shell with administrator privileges to do this. If you're looking to automate this at login, you can make a batch file and install it as an administrator with task scheduler. Tasks installed that require administrator privileges, but were installed by an administrator, will not prompt for privileges at startup, but will be granted them automatically.
ANSWER 2
Score 2
I was able to install the free devcon.exe
utility inside the Windows 10 driver kit from Microsoft.
This utility will let you enable / disable whatever you see in Driver Manager; in my case, I found that the "High Definition Audio Bus" from Microsoft on Windows 10 was badly written and was consuming 10% of CPU, always.
I disabled it with:
devcon.exe disable PCI\VEN_8086"&"DEV_9D71*
You have to run this as administrator, so I put this into a .bat
file, and made a 'run as administrator' shortcut for it.
ANSWER 3
Score 0
i'm able to stop the driver
C:\Windows\system32>sc stop kmd
SERVICE_NAME: kmd
TYPE : 1 KERNEL_DRIVER
STATE : 3 STOP_PENDING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
But the corresponding GUI is not updated in devmgmt.msc Usually when i disable the driver in Device Managenement, down arrow on the driver icon appears to confirm the driver is disabled.
with the command line sc, the down arrow does not appear
ANSWER 4
Score 0
Try C:\> NET STOP drivername
.