Search code examples
scriptingwindows-7batch-file

devcon on windows 7 - remove drivers


I have a problem using devcon.exe in Windows 7 for the purpose of removing drivers, it worked fine in Windows XP. However, I can't remove the drivers using "dp_delete" and "Remove" in Windows 7.

Anyone has an idea why it might happen?

Thanks.


Solution

    1. Download the “Windows Driver Kit (WDK) 7.1.0″ from MS, it is an ISO image several hundreds meg

    2. Using UniversalExtractor (http://legroom.net/software/uniextract), extract the ISO to a temporary directory.

    3. Again using UniversalExtractor, 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". This devcon works fine under W7x64 Pro.

    Along the way UniversalExtractor will prompt you with some warnings, just click OK.

    (source)