How to bypass "Click the Network adapter" dialogue box

Hi,

I am writing a class installer and trying to install a Network Adapter
using the following APIs in the sequence. Due to requirement it cannot
be installed as a PNP device.

  1. SetupDiGetINFClass

  2. SetupDiCreateDeviceInfoList

  3. SetupDiCreateDeviceInfo
    DevInstallParms.cbSize = sizeof(SP_DEVINSTALL_PARAMS);
    DevInstallParms.Flags = DI_ENUMSINGLEINF | DI_QUIETINSTALL
    | DI_DONOTCALLCONFIGMG ;

  4. SetupDiSetDeviceInstallParams( DevInfoSet, &DevInfoData,
    &DevInstallParms )

  5. SetupDiBuildDriverInfoList( DevInfoSet, &DevInfoData,
    SPDIT_COMPATDRIVER )

  6. SetupDiCallClassInstaller( DIF_SELECTDEVICE, DevInfoSet, &DevInfoData
    )

Just after that a pop-up dialogue box appears with “Click the Network
adapter” with just my adapter in the list. I want to bypass this
dialogue box (So may be some to autoclick on “OK” button.) and directly
install my device without any user intervention. I tried to find the
ways in MSDN, DDK but couldn’t find any.

Is there any way to bypass that install pop-up dialogue box.

Thanks

  • Vipul