question

AlexanderSeidl-3027 avatar image
0 Votes"
AlexanderSeidl-3027 asked AlexanderSeidl-3027 commented

INF file for installing driver for bus device and child devices at once

Hello everyone,

I am developing a bus driver for a PCIe interface card.
The bus driver instantiates physical device objects, on which a virtual COM port driver is loaded.

Therefore I have two INF files. One for the actual device (the bus driver) and one for the individual channels (the virtual COM port driver).
That forces the user to first install the bus driver and after the bus has instantiated its child devices the user has to install the virtual COM port driver in a second step.

Is it possible to install both drivers at once?


Kind regards and thanks in advance
Alex

windows-hardwarewindows-hardware-wdkwindows-hardware-code-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PavelA avatar image
0 Votes"
PavelA answered AlexanderSeidl-3027 commented

Yes, possible. Just pre-install both driver packages and the children will be installed as soon as the parent (PCIe) gets installed and enumerates them.
pnputil /add-driver .... /install
This is known as "software first" scenario.

--pa

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hey, thanks for your answer.
I want the user to install both drivers at once via the device manager (right click on the unknown device --> update driver).
Is something like this possible without manually calling pnputil or writing an installation wizard?

Thanks,
Alex

0 Votes 0 ·
PavelA avatar image PavelA AlexanderSeidl-3027 ·

Yes it is possible in the install section of a device to pull in another INF .
See the CopyINF directive.

https://docs.microsoft.com/en-us/windows-hardware/drivers/install/copying-inf-files



--pa

1 Vote 1 ·

Ah perfect, that is exactly, what I was looking for.
I now support both possibilities (via pnputil command line utility and via device manager).

Thank you very much :)

0 Votes 0 ·
DoronHolan avatar image DoronHolan AlexanderSeidl-3027 ·

I would strongly recommend not relying solely on device manager as the way your user's install and update drivers. pnputil on the command line, as Pavel suggested, will perform all the same actions as the device manager UI, but without the possibility of user error.

0 Votes 0 ·

Allright, I additionally use pnputil now.

Thanks :)

0 Votes 0 ·