Hi,
I want to install one driver with .inf file without connecting the device
to system. How can I install a driver first without the device plugged in.
I think UpdateDriverForPlugAndPlayDevicesProto create device object without
hardware Plugged in. I need install the driver first, then inserting the
device and system find the driver. Which API should I use instead.
Any help would be appreciated.
There is no way to install a PnP driver for a device that is not on the bus. You can install the correct registry entries into the critical device database such that the kernel can start the driver without user mode code running, things like PCI(e) storage controllers frequently do this. A little gotcha for critical device database installed drivers is after the system is up, it likes to run the full user mode PnP install, which if you device is critical to the boot, will want to reboot your system.
To successfully preinstall a device, you would need to know what the PnP instance ID will be, and only the bus driver really knows. Recent OS versions like to use the device serial number in the PnP instance ID, so a driver install is very specific to one specific piece of hardware. Using the serial number allows the device to move (like to a different USB port) while retaining any device instance specific settings.
You can pre-stage the driver in the driver store, so when the device is detected, user mode PnP installer code can find the driver without interacting with a user.
Can you tell us why the normal driver install process is insufficient for you?
Jan
From: elahe shekuhi >
Reply-To: Windows List >
Date: Saturday, January 17, 2015 at 6:09 AM
To: Windows List >
Subject: [ntdev] installing the driver first without the device plugged in
Hi,
I want to install one driver with .inf file without connecting the device to system. How can I install a driver first without the device plugged in. I think UpdateDriverForPlugAndPlayDevicesProto create device object without hardware Plugged in. I need install the driver first, then inserting the device and system find the driver. Which API should I use instead.
Any help would be appreciated.
— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Use dpinst from the wdk tools or alternatively write your own installer app
using the difx api (but why bother?). This will happily pre-install your
driver package so that when your device is enumerated it will automatically
install.
Mark Roddy
On Sat, Jan 17, 2015 at 9:09 AM, elahe shekuhi wrote:
> Hi,
>
> I want to install one driver with .inf file without connecting the device
> to system. How can I install a driver first without the device plugged in.
> I think UpdateDriverForPlugAndPlayDevicesProto create device object without
> hardware Plugged in. I need install the driver first, then inserting the
> device and system find the driver. Which API should I use instead.
>
> Any help would be appreciated.
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer