Jump to content

Installing drivers for unattached USB devices


o0gabo0ga

Recommended Posts

Hi guys,

I'm working on distributing some software for a digital camera with the drivers installed, unfortunately the drivers are unsigned.

The users that will be using the cameras only have limited accounts that cannot install the drivers themselves, and there is no way of making sure the camera will be plugged in when the drivers are installed.

I've tried using devcon to install the drivers, they come up in device manager but comes up with a yellow 'i' and the properties says it cannot start, once i plug the camera in it tries to install again instead of using the already installed drivers. The only way I've managed to get around this is to have the camera plugged in and have the user logged on and then installing the drivers, but this isn't a very efficiant way to install the drivers on 100+ PCs. The software distribution runs at startup, before the user logs in.

Any ideas?

Link to comment
Share on other sites


Your best bet is to put these drivers into your Windows installation, then they will be present in any system if the user connects the camera. I wouldn't recommend devcon to install drivers, as it will force a driver to install as a device, not just make the files available to Windows, if the device is not present. Then again, this is what you are seeing.

Link to comment
Share on other sites

  • 2 weeks later...
Your best bet is to put these drivers into your Windows installation, then they will be present in any system if the user connects the camera. I wouldn't recommend devcon to install drivers, as it will force a driver to install as a device, not just make the files available to Windows, if the device is not present. Then again, this is what you are seeing.

Unfortunatley adding the drivers to the windows installation wouldn't be ideal as it would mean rebuilding a whole lot of machines unnessasarily. I gave up with devcon as you suggested and just signed the drivers myself and used dpinst.exe to preinstall the drivers for when the device is plugged in.

This works as the limited accounts can install signed drivers already in the driver list.

I had to create the .cat files myself using inf2cat, its nice and simple so won't post an example.

Heres a copy of the .cmd file that silently signs the drivers and copies them to windows ready to be installed incase anyone is interested:

XCOPY "driver folder" "C:\driver folder"  /E /I /Q /Y
MakeCert.exe -ss test -sk "Test" -n "CN=TestCert Company" C:\TestCert.cer
certmgr.exe -add -c -s -r localMachine CA -n "Root agency" -s -r localMachine root
SignTool sign /v /s test /n "TestCert Company" /a "C:\driver folder\driver.sys"
SignTool sign /v /s test /n "TestCert Company" /a "C:\driver folder\driver.cat"

SignTool verify /pa "C:\driver folder\driver.sys"
SignTool verify /pa "C:\driver folder\driver.cat"

DPInst.exe /q /path "C:\driver folder"

The "SignTool verify" lines are not needed but its handy for testing.

There may be a better way of doing this (creating secure certificates etc.) but this is my first look at creating my own certificates and signing drivers.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...