devcon failed
-
Friday, August 10, 2012 2:24 PM
I am trying to install sample virtual audio device MSVAD_Simple using Devcon. (Because I would like to learn about virtual audio device development). Alas no matter what I try it just says:
devcon failed
I have Windows 7 (64 bit) on intel i7-2600 processor and used the /amd64 switch to build both devcon and msvad because the other options ended up saying they were the wrong type.
Note: To be able to build devcon I had to duplicate c:\winddk\7600.16385.1\bin\amd64 to c:\winddk\7600.16385.1\bin\analysis\x86\amd64 was wondering if I need an account with admin privileges and if there is a log file with more details about why it is failing.
Thanks in advance :)
~~~ PEr aRDUa ad asTrA ~~~ (through adversity to the stars)
All Replies
-
Friday, August 10, 2012 4:28 PMModerator
When you get a "devcon failed" error message, look at C:\Windows\inf\setupapi.dev.log which will have more detailed information.
The interesting lines typically begin with an exclamation point (!) or three (!!!).
Yes, you need to run devcon.exe elevated.
Matthew van Eerde
-
Saturday, August 11, 2012 2:45 AM
Thanks, I tried that but there is nothing relevant in there. I even deleted said file and it was not recreated when I ran the version of devcon I built, so there is obviously something wrong with my devcon.exe :(
I tried hdwwiz.exe, the hardware wizard. That does write to the log file. I found I need ALL the audio drivers of the msvad package to be present in the same folder as the .inf (not just vadsimpl.sys).
The hardware wizard then progressed to say it was installed. Alas compatibility assistant popped up saying the driver would be unavailable as it doesn't have a valid signature. :(
I am pleased to see :)
I am sure a hacker in the past had put a hidden tunneling protocol device on my computer (which is why I avoid using admin account as much as possible) but my question now is how to sign a device driver for development purposes... and... what is going to stop hackers from doing the same?
~~~ PEr aRDUa ad asTrA ~~~ (through adversity to the stars)
- Edited by Perdie Saturday, August 11, 2012 2:49 AM
-
Saturday, August 11, 2012 5:37 AM
I had some more time to look at it and to sign the drivers I used the command
inf2cat /driver:. /os:7_x64 /v
it then processes all .inf files from the current working directory "." down... so in my case that means msvad.inf
You have to edit the .inf to give current date in the [version] section because the 2007 date in there is not accepted.
hdwwiz.exe still says it is not digitally signed because you need generate a certificate of some sort and device manager shows the devices as installed but disabled with code 52 error.
There is supposed to be a boot configuration data editor and the following command would disable the digital signing requirement
bcdedit -debug on
I don't have bcdedit and could not find any site I would trust where I can download it.
Instead I press F8 at startup time and choose the option to disable device driver signing requirement and then the driver does appear in my mixer as an option for output.
-
Monday, August 13, 2012 4:13 PMModerator
bcdedit comes with the OS (Vista and later.) you don't need to download it from anywhere
Once you've created the .cat you need to use signtool.exe to sign it.
You can see more at this blog post: http://blogs.msdn.com/b/matthew_van_eerde/archive/2011/09/14/how-to-install-unsigned-drivers.aspx
Matthew van Eerde
-
Monday, August 13, 2012 4:42 PMModerator
> is going to stop hackers from doing the same?
Hackers can also sign drivers. All that signing does is tell you who says the driver is OK.
Matthew van Eerde
-
Tuesday, August 14, 2012 8:51 AM
Thank you, I have bookmarked that page now. I am also very happy to understand more about what that signature tree means.
Meanwhile as I am at the beginning of the learning slope with device drivers I have setup a virtual machine and connect that via a pipe to windbg running on my host 64 bit Windows 7. Testing my driver on 32 bit Windows XP during development is fine and that virtual machine doesn't connect to anything that could compromise security so I simply changed its boot.ini to always boot in diagnostic mode.
I can see my diagnostic messages as I interact with the virtual audio device driver, but I have not yet managed to get a breakpoint with windbg showing C++ source code. Any links on that will be much appreciated and when I get it to work I will make a youtube tutorial for others like me who want to get started with a basic setup for Windows driver development.
~~~ PEr aRDUa ad asTrA ~~~ (through adversity to the stars)
p.s. once I got it all working I summarized it in video http://vimeo.com/56138257
- Edited by Perdie Saturday, December 22, 2012 7:51 AM
-
Tuesday, August 14, 2012 5:35 PMModerator
To see C++ source code you can use the .srcpath debugger extension to tell windbg.exe where your source is. windbg will also need private .pdb symbols; you can use the .sympath debugger extension to tell windbg.exe where your symbols are.
Matthew van Eerde


