Questions tagged [devcon]

DevCon is a command line device manager for Windows system used to list , enable, disable, install, configure, and remove devices.

DevCon is built-in command and needs to be downloaded from Mcrosoft's site.

Dcoumentation:

42 questions
21
votes
3 answers

Enabling/disabling a device in Windows 10 from command line

I have a specific piece of hardware which I'd like to disable and re-enable each time my Windows restarts. I created a batch script which is supposed to do that, along with running my program afterwards: cd %~dp0 devcon.exe disable…
errata
  • 5,695
  • 10
  • 54
  • 99
16
votes
5 answers

devcon disable cannot disable device not found

I'm on Windows 8.1 trying to disable my clickpad programatically. I've installed the correct x64 bit version of devcon as noted here. I can find the correct device but devcon disable with the same parameters fails. PS…
George Mauer
  • 117,483
  • 131
  • 382
  • 612
4
votes
0 answers

Programmatically install "non compatible" driver

I want to install signed driver but unfortunately the .inf file does not contain the correct hardware IDs. (incompatible driver) I can install the driver manually like described here: Force installing incompatible .inf driver in Windows Server 2019…
Manuel Amstutz
  • 1,311
  • 13
  • 33
4
votes
1 answer

Restart USB port WITHOUT reboot (DevCon)

UNNECESSARY BACKGROUND INFO: I purchased a new USB microphone (Samson Q2U) and I am having an issue where every time I (re)boot my PC, the mic does not work (it does receive power) until I unplug and re-plug the microphone from the USB port. Now…
Magnum
  • 43
  • 6
4
votes
1 answer

Executing DevCon CMD command from python

I want to restart driver with DevCon from python script. It works from command line with this command: devcon restart \"sd0007322081041363_kcanv\" I tried this: os.system("devcon restart \"sd0007322081041363_kcanv\"") with result: 'devcon' is not…
Budlog
  • 79
  • 10
3
votes
3 answers

calling devcon from inside windows forms not working

Plan The plan is to disable and subsequently enable a device from inside a windows forms application. To test the first building block of my plan, I open cmd with admin privileges and the following works perfectly: > devcon hwids =ports > devcon…
monkey
  • 1,213
  • 2
  • 13
  • 35
3
votes
0 answers

How to power off USB device from Windows using batch or any API

For testing purposes I need to power off a USB device from my computer programmatically. The microprocessor in the USB device is ARM Cortex M4. I have tried using Devcon, although the device was disabled, power was still provided to the device. I…
Adilli Adil
  • 1,231
  • 1
  • 17
  • 25
2
votes
1 answer

Windows Driver : Install legacy hardware with command line tool

Operation System: Windows Server 2016 R2 I have a RAMDisk driver can be installed with "Add Legacy Hardware Wizard" (hdwwiz.exe) successfully. From the output of devcon hwids *, the device can be seen as below. ROOT\UNKNOWN\0000 Name: RAMDrive […
Mr.Wang from Next Door
  • 13,670
  • 12
  • 64
  • 97
2
votes
0 answers

How to use devcon.exe in C# (or other ways to install driver and ping a Hardware ID without infInstall)?

I'm finishing a helper about driver. Begining, I use DPInst but it can't work in any arguments. Devcon is available when a batch file call up like devcon install xxxxxxx.inf *xxxxxxx. It needs to edit the devcon.exe's UAC to open. In c# I never…
2
votes
2 answers

Is there a command line way to detect uninstalled drivers in devicemanger?

I am trying to find a command line way to detect uninstalled drivers in device manager, I need a way to detect if there are items under "other devices" as shown below screen shot
Ritz
  • 1,193
  • 6
  • 15
  • 26
2
votes
1 answer

How to disable/enable device using devcon.exe in python for some iteration

I am looking for solution, I want to disable/enable the particular device in windows system using devcon.exe in python script. I am able to disable/enable using devcon.exe windows cmd.exe separately but i am looking for this activity to done using…
2
votes
2 answers

Delete Windows Driver Device Class in Registry

I have a .INF with a security descriptor HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)". I changed this security descriptor to remove admin rights. So that any user can open the application. The descriptor I used is…
radar101
  • 67
  • 10
2
votes
2 answers

Devcon disable not working in Windows 8.1

I'm trying to make a simple script that disables my touchpad fast. I found tons of articles about devcon, I downloaded it, and I always get an error as I'm trying to do it, no matter which version of devcon I'm using. C:\Windows\system32>devcon…
dobragab
  • 69
  • 1
  • 2
  • 7
1
vote
1 answer

How to get an object of Devcon output using PowerShell (winpe)?

I would like to select an object from Devcon.exe output. PCI\VEN_8086&DEV_2822&SUBSYS_1790103C&REV_04\3&11583659&0&FA Name: Intel(R) Chipset SATA/PCIe RST Premium Controller Driver node #0: Inf file is C:\Windows\INF\iastorav.inf Inf…
Cheries
  • 834
  • 1
  • 13
  • 32
1
vote
0 answers

how to control device disable with source code in visual studio 2019?

my pc is OS: windows10 x64. i want to enable / disable virtual com port using code. actually, error is happened below, errorcode = #define ERROR_ACCESS_DENIED 5L in window10, i cannot not control device disable or enable ??? or source…
1
2 3