Installing bus/child driver

Hi guys,

We have a bus driver and a child driver with INFs.

The installation via Add Hardware wizard is always successful without reboot required. But in our installation DLL, it’s always required to reboot since the child device node was removed after it’s created as shown in setupapi.log. In this case, the final page of Add Hardware wizard was always shown after the installation.

Basically, we firstly install the child inf with SetupCopyOEMInf. Then, install the bus driver with:

SetupDiGetINFClass
SetupDiCreateDeviceInfoList
SetupDiCreateDeviceInfo
SetupDiSetDeviceRegistryProperty
SetupDiCallClassInstaller
UpdateDriverForPlugAndPlayDevices

it’s same as what DevCon does and DevCon also fails with removing the newly crerated child dev-node.

Another thing with these Setup APIs is, there were two installations of the child device. The first installation of child device successfully created a dev-node. But immediately another installation was initiated. During the second one, it tried to restart the device and got a fail, then the dev-node was removed.

From there, we suspected there could be something wrong with the usage of Setup API. So change them to:

SetupDiGetINFClass
SetupDiCreateDeviceInfoList
SetupDiCreateDeviceInfo
SetupDiSetDeviceRegistryProperty
SetupDiRegisterDeviceInfo
UpdateDriverForPlugAndPlayDevices

The difference of these APIs is, there was no second installation of child device. But the result was same: dev-node was removed immediately after the first installation.

We searched on web and found someone has posted a same question here couple years ago without answers.

So, could anyone give us a hint about this problem? Or any ideas about what Setup APIs Add Hardware wizard uses which cause successful results?

Thanks in advance.

Green

Forgot to say that the driver package was signed with a test cert and displayed as signed drivers on the test machine. OS is Windows XP Pro 32bit.

Our purpose of this installation DLL is to make un-attended installations (eg. no dialog, no mouse clicking and etc) on the end-user side after we get drivers WHQLed.