Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a device that I often enable and disable using the Device Manager. I'd like to write a script to do this programmatically (that is, using the command line). I saw a program called devcon that works for Windows 2000, Windows XP and Windows Server 2003, but I need one that works for Windows 7. Is there one freely available?

share|improve this question

3 Answers 3

up vote 7 down vote accepted
  1. Download the WDK Windows Driver Kit 7.1.0 from Microsoft.
  2. Use the Universal Extractor to extract the contents of the ISO to a temporary location... or use whatever method you like to mount and get inside the ISO.
  3. You can use the same tool to extract the install file "WDK\setuptools_x64fre.msi" to a temporary directory.
  4. In that temporary directory you will find "WinDDK\7600.16385.win7_wdk.100208-1538\tools\devcon\amd64\devcon.exe". It has been tested to work with Win7x64, and it is part of the most recent Windows Driver development kit.

So, there is Devcon.exe for Windows 7 for you. It works with Windows 7, and it is free.

Instructions taken from the Microsoft Answers forum.

share|improve this answer
This gentleman here was kind enough to upload the file by itself, so that you don't have to download a 700mb ISO just to extract it. Worked fine for me. –  HodofHod May 24 '13 at 2:11
Make sure to also extract setuptools_x64fre_cab001.cab, because actually that cab file contains devcon, not the msi. –  Tarnay Kálmán Jan 10 at 15:38

DevManView is another way to do this - and it's a lot easier to acquire than devcon.exe, but still free.

I use the following command in a batch file to use disable/enable a device on my wife's laptop when we need it:

devmanview.exe /disable_enable "SDA Standard Compliant SD Host Controller"
share|improve this answer
This worked in Vista too. –  tazo todua Sep 17 at 21:19
It makes me both sad and happy that a tool that does this exists. –  dwj Oct 3 at 4:12

For Windows 8, there is WDK 8.1 available at http://msdn.microsoft.com/en-US/windows/hardware/gg454513

The small setup binary allows to download (without installing WDK) (~500MB) and without iso-container.

Searched cabs for devcon.exe but names are scrambled. Used Universal Extractor to extract "..\Installers\Windows Driver Kit-x86_en-us.msi" - ends with an error. However, got the file I need: "...\Windows Kits\8.1\Tools\x64\devcon.exe"

Tool needs to run with Admin privs to have effect.

share|improve this answer
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  karel Jul 22 at 1:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.