Install a filter driver automatically -- Continue

Hi, everyone,

I have a filter driver for an HID device based on WDK Firefly sample. My
driver could use Hardware-First Installation to setup driver freely. ---- Use
UpdateDriverForPlugAndPlayDevices API of setupapi.h.

My question is Software-First Installation about HID device. I mean setup
the HID driver before the device plug in the computer. After that, It alway
failed and the appears as “HID-compliant mouse”, My driver could not be
handled or not be showed name of “Shiny Things Firefly Mouse” in the Device

I’ve tried do install HID driver use several ways as below, but they
wouldn’t work at all.

  1. Use the command to install ---- NG
    " rundll32.exe setupapi,InstallHinfSection Firefly_Inst 132 .\firefly.inf"

  2. UpdateDriverForPlugAndPlayDevices API ---- NG

  3. following the document in WDK ---- “Determining Whether a Device Is
    Plugged In” ---- NG

  1. SetupCopyOEMInf
  2. SetupDiGetClassDevs
  3. SetupDiEnumDeviceInfo
  4. SetupDiGetDeviceRegistryProperty
  5. CM_Get_DevNode_Status
    I used the sample code in WDK of toaster\toastpkg\toastva\util.c
  1. devcon utility
  1. devcon.exe update firefly.inf “HID\Vid_045E&Pid_001E” ---- NG
  2. devcon.exe install firefly.inf “HID\Vid_045E&Pid_001E” ---- There is a
    new driver be installed with an exclamation mark.
  3. devcon.exe dp_add firefly.inf ---- NG
  1. SetupCopyOEMInf ---- NG

  2. Even the Manual installation fails too.

  1. “Add Hardware”
  2. “Welcome to the Add Hardware Wizard”
  3. “Yes, I have already connected the hardware”
  4. “Add a new hardware device”
  5. “Install the hardware that I manually select from a list (Advanced)”
  6. “Show all devices”
  7. “Have Disk…”
  8. Browse to firefly directory
  9. “The specified location does not contain information about your hardware.”
  1. The “HID-compliant mouse” could not be updated
  1. Double click “HID-compliant mouse” and click tab Driver
  2. “Update Driver…”
  3. “No, not this time”, Next
  4. “Install from a list or specific location (Advanced)”
  5. “Include this location in the search” and Browse the firefly.inf location
  6. “Cannot Continue the Hardware Update Wizard”

My question sounds same like this post named “Install a filter driver
automatically”, website link as below:

But I think my request is a different one, I want setup an HID filter driver
use Software-First Installation mode. When I finish the Software-First
Installation, and plug in the USB device, my driver will be installed

Correct me if i am wrong which i might be. Need your help.

Thanks in advance,
Daniel Xu