The differences between a auto driver installatio and a manual driver update

Hi, folks,

I have been working on a driver installer. And I find some interestings. We know, the last step of installing a driver is to handle DIF_NEWDEVICEWIZARD_FINISHINSTALL. However, if I install my driver by scanning the new hardware and install my driver step by step accroding to the Windows auto driver installation wizard, it could not read PortIndex’s value from its registry when it comes to DIF_NEWDEVICEWIZARD_FINISHINSTALL process(I am sure this value exists then, and the value of PortName could be got successfully). Whereas, if I install the driver by manually updating it, all the registry values could be got without any problem.

Why? Any lead is appreciated.

Joseph Deer

  1. I wonder during the process of refreshing DeviceManager, is the registry accessible?

  2. Why the string PortName could be read, while DWORD valud PortIndex could not be got?