inf file creates Unknown device in Device Manager

@craig_howard said:
a better question would be “How do I programmatically get a driver started for a driver already in the driver store for a PCIe device already attached to the system but not recognized”

To start a driver it must be installed on the device first. Driver already in the store does not mean it is installed.
To complete the PnP install ceremony, the bus driver MUST recognize the device and make various IDs that match the driver.
No matter how many drivers you put in the store, if the bus driver cannot enumerate it - the game is over.

but for medical devices, high availability datacenters (like bladeservers) and factory floors that is simply not an option.

A lot of systems have hot plug PCIe and even legacy PCI. PCIe has special provision for hot plug … the rest is software.

No interruption on the line, no glitch on the MRI machine, no taking a datacenter down, just put on the new tires while the engine is running and done

Yes, exactly this way.

The tricky part is in getting the PCIe device to load the new driver without needing a reboot, and that’s where everyone seems to be playing the “assume” card.

Really? the tricky part is proper handling of surprise removal. Especially, usermode apps must not hold on any handle that pins down the surprise-removed instance so that it can be restarted quickly.

Not mentioning what if the hardware or firmware cuts some corners of the spec because the other OS can tolerate it… Windows is not too bad after all.

1 Like

@Pavel_A When I use devcon to install drivers, I still get Unknown device besides the correct device. So I am not sure if the problem is due to devcon or my inf file. You can refer to my reports above how to avoid having Unknown device created.

I am sure I have remove previous copies of drivers as Windows 10 does not automatically install them when I perform Scan for Hardware changes. Everytime I uninstall device I always check “Remove driver”, and

dism /online /get-drivers /format:table
pnputil.exe /d oemNN.inf

When I use devcon to install drivers, I still get Unknown device besides the correct device

Do you mean you use devcon install? If so, then that’s exactly what you are asking for. If you want to stop that side effect, then for gosh sakes STOP USING devcon install. It was NEVER intended to work with drivers for genuine devices.