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:

39 questions
13
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
  • 4,679
  • 8
  • 44
  • 92
13
votes
4 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
  • 103,465
  • 117
  • 349
  • 581
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
  • 5
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
  • 69
  • 9
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,162
  • 1
  • 16
  • 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
  • 10,685
  • 10
  • 47
  • 76
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
  • 51
  • 5
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
  • 59
  • 1
  • 2
  • 7
1
vote
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,132
  • 10
  • 27
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
vote
2 answers

Update driver for one of the same model network adapters

There are multiple network adapters of the same model in the target computer. As below, they are all Intel I211. PCI\VEN_8086&DEV_1539&SUBSYS_00008086&REV_03\0060E0FFFF6336A000 Name: Intel(R) I211 Gigabit Network Connection Hardware IDs: …
YantingChen
  • 638
  • 11
  • 12
1
vote
1 answer

Using Devcon to disable a USB port

I am trying to find a way to be able to enable/disable a USB port on my computer via command prompt or powershell. I have looked EVERYWHERE and the only possible solution I have found is by using the devcon disable command. However, when I try to…
Taylor
  • 23
  • 1
  • 3
1
vote
0 answers

remove com port using devcon (for loop)

I was trying to delete com port using command line. Right now I am using devcon.exe that is a part of windows WDK. I have tried using devcon findall =ports and used devcon remove "@some specific id". It worked totally well. Instead of removing them…
Mr_U4913
  • 1,150
  • 4
  • 12
1
vote
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…
1
2 3