Answered by:
devcon install/update/remove fails even though installation through device manager is successful

Question
-
Hi,
I need to create a batch file that install a 3rd party camera driver for PCI device. When I install the driver in device through device manager, I can do it successfully. However, when I try to the same, I get the message 'devcon failed' with no further elaboration. I provided following commands but none of them works.
devcon install "C:\Program Files (x86)\Molecular Imaging\MI\Application\Drivers\pixci_win7x64\epixxcw6.inf" "PCI\VEN_165A&DEV_EB01&CC_FF00"
or after installing through device manager
devcon update "C:\Program Files (x86)\Molecular Imaging\MI\Application\Drivers\pixci_win7x64\epixxcw6.inf" "PCI\VEN_165A&DEV_EB01&CC_FF00"
or
devcon remove "PCI\VEN_165A&DEV_EB01&CC_FF00"
However 'devcon find "PCI\VEN_165A&DEV_EB01&CC_FF00" ' runs fine and return the message that 'one matching device found'.
Similarly 'devcon dp_add "C:\Program Files (x86)\MolecularImaging\MI\Application\Drivers\pixci_win7x64\epixxcw6.inf" ' runs fine and the message I get in return is: c:\windows\system32\inf\oem151.inf addd.
After that I also tried install/update with 'c:\windows\system32\inf\oem151.inf' driver but it still fails.
Is there any way, I could see the elaborated message about failure or I could know whats wrong with my execution of devcon.
Thanks,
Divya
- Edited by Divyapaliwal Wednesday, August 13, 2014 3:18 PM
Wednesday, August 13, 2014 3:18 PM
Answers
-
Hi,
I am afraid there seems to be no such function available for DevCon.exe to display the error messages here. In fact, The parameters in a DevCon command must appear in the order shown in the syntax. If parameters are not in order, DevCon ignores them, but does not display a syntax error. Instead, it processes the command with the remaining parameters.
We can use the following commands in a Command Prompt window: DevCon help or DevCon help command.
To get the helpful information regarding the command syntax.
More information, please see:
Device Console (DevCon.exe) Commands
Best regards
Michael Shao
TechNet Community Support- Edited by Michael_LS Thursday, August 14, 2014 10:20 AM
- Marked as answer by Cloud_TS Tuesday, September 9, 2014 7:54 AM
Thursday, August 14, 2014 10:19 AM
All replies
-
Hi,
I am afraid there seems to be no such function available for DevCon.exe to display the error messages here. In fact, The parameters in a DevCon command must appear in the order shown in the syntax. If parameters are not in order, DevCon ignores them, but does not display a syntax error. Instead, it processes the command with the remaining parameters.
We can use the following commands in a Command Prompt window: DevCon help or DevCon help command.
To get the helpful information regarding the command syntax.
More information, please see:
Device Console (DevCon.exe) Commands
Best regards
Michael Shao
TechNet Community Support- Edited by Michael_LS Thursday, August 14, 2014 10:20 AM
- Marked as answer by Cloud_TS Tuesday, September 9, 2014 7:54 AM
Thursday, August 14, 2014 10:19 AM -
-
I had the same problem and I fixed it. The issues, for me at least, was that the devcon find returns a string that is very specific to the instance of the device. Something like HID\VEN_xxxx&DEV_xxxx&SUBSYS_xxxxxxxx&REV_xx&COLxx\x&xxxxxxx&x&xxxx which i'll refer to as LONG_HWID. It does not look anything like what I have in my INF and if you I tried
devcon update xx.inf "%LONG_HWID%"
I got "devcon.exe fails." Looking in %SYSROOT%\inf\setupapi.dev.log I saw that a match was not found in my inf. My INF has HID\VEN_xxxx&DEV_xxxx&COLxx (SHORT_HWID). If I ran
devcon HwIds "%LONG_HWID%"
you'll see the alternative hwids for that device. One of them is SHORT_HWID. So what did work for me was
devcon update xx.inf "%SHORT_HWID%"
Andrew
Thursday, February 4, 2016 8:48 PM