How to programmatically install a device after modifying the driver's INF file?

  • Thread starter Thread starter Fran Litterio
  • Start date Start date
F

Fran Litterio

Guest
Our product dynamically assigns devices to its driver by first installing the driver with no devices listed in the driver's INF file. Later, our software does the following:

  1. Modifies the INF file to reference a specific device hardware ID (e.g., a NIC card).
  2. Uninstalls the Windows driver for the device.
  3. Calls UpdateDriverForPlugAndPlayDevices, which scans all the INF files for references to the device's hardware ID and updates the driver so that it now owns the I/O resources for that device.

This works in Windows 7 even though the change to the INF file invalidates its digital signature, because a dialog is displayed to the user asking for confirmation: "Windows can't verify the publisher of this driver software" ... "Install this driver software anyway". But in Windows 8 the call to UpdateDriverForPlugAndPlayDevices fails with error code 0xe000024b (which I can't find documented anywhere).

Does Windows 8 now mandate that the digital signature on an INF file must always be valid, even after the driver has been successfully installed?

Is there any way (short of disabling driver signature enforcement, which is unacceptable to our customers), to make this work in Windows 8 after we have modified the INF file and thus broken its digital signature?

Thanks in advance.
--
Fran Litterio
IntervalZero Inc.

Continue reading...
 
Back
Top