From: JY on
Hi,

As I'd mentioned in an earleir post, I'm using DIFxAPIs
(DriverPackagePreinstall) to pre-install a driver in a Windows based
application.

The scenario is as follows:
1. User brings up application.
2. Driver is pre-installed (SW first)
3. User plugs-in USB device
4. Windows should now install the pre-installed driver. But somehow this is
not happening sometimes (on XP, Vista and 7). I have to go to the Device
Manager and say Update driver.

How do I force Windows to load (install) the pre-installled drvier?

TIA,
JY
From: Pavel A. on
"JY" <sd(a)nospamgroup.com> wrote in message
news:D8658354-5EF6-4054-9790-C01FDF31DDCD(a)microsoft.com...
> Hi,
>
> As I'd mentioned in an earleir post, I'm using DIFxAPIs
> (DriverPackagePreinstall) to pre-install a driver in a Windows based
> application.
>
> The scenario is as follows:
> 1. User brings up application.
> 2. Driver is pre-installed (SW first)
> 3. User plugs-in USB device
> 4. Windows should now install the pre-installed driver. But somehow this
> is
> not happening sometimes (on XP, Vista and 7). I have to go to the Device
> Manager and say Update driver.
>
> How do I force Windows to load (install) the pre-installled drvier?

Sign your driver, so that it has the highest range.

-- pa


From: JY on
"Pavel A." wrote:

> "JY" <sd(a)nospamgroup.com> wrote in message
> news:D8658354-5EF6-4054-9790-C01FDF31DDCD(a)microsoft.com...
> > Hi,
> >
> > As I'd mentioned in an earleir post, I'm using DIFxAPIs
> > (DriverPackagePreinstall) to pre-install a driver in a Windows based
> > application.
> >
> > The scenario is as follows:
> > 1. User brings up application.
> > 2. Driver is pre-installed (SW first)
> > 3. User plugs-in USB device
> > 4. Windows should now install the pre-installed driver. But somehow this
> > is
> > not happening sometimes (on XP, Vista and 7). I have to go to the Device
> > Manager and say Update driver.
> >
> > How do I force Windows to load (install) the pre-installled drvier?
>
> Sign your driver, so that it has the highest range.

I have to deal with unsigned drivers sometimes. The drivers are provided to
us by a client and it is absolutely necessary to use unsigned drivers too.
Signing the driver is not a solution.
From: Ilya Konstantinov on
On Apr 1, 8:38 am, JY <s...(a)nospamgroup.com> wrote:
> I have to deal with unsigned drivers sometimes. The drivers are provided to
> us by a client and it is absolutely necessary to use unsigned drivers too..
> Signing the driver is not a solution.

We have used a solution of pre-installing the devices in the registry.
When I say "pre-install", I mean something different from what DifX
means. When DifX says "pre-install", it means making sure the driver
and the INF are available for Windows' device installation process
(when it decides to kick in). When I say "pre-install", I mean
skipping the device install altogether.

This requires registry tinkering, though. Yes, it's ugly, but
ultimately it works: Windows behaves as-if we've already gone through
the device installation process (the "Add New Hardware" wizard) for
this device.

Also note that you'd have to know your Device Instance ID if you wish
to pre-generate those registry keys. The Device Instance ID (can be
seen in the device properties) is either dependent on the port where
the device is plugged or on the device's unique identifier (for USB
devices, the "iSerialNumber" in the device descriptor), so it's not
trivial to anticipate.

So yes, it's kinda messy and any MS person here would scold me for
even suggesting it. But it works.
From: Mike [MSFT] on
I'd be interested in hearing more about why you can't sign the driver. Even
if you get it from a 3rd party, you could sign it with your own cert.

There are APIs you can use to force a specific driver to be loaded from an
application, but not in a software first way as you describe below. If you
preinstall the driver then you are leaving it up to PnP to pick the best
ranked driver and any signed driver will outrank an unsigned driver. You
would have to have some EXE run after Windows installs the signed driver to
install the unsigned driver.

See here: http://msdn.microsoft.com/en-us/library/ff544710.aspx

-Mike

"JY" <sd(a)nospamgroup.com> wrote in message
news:E46B8CCA-D519-4E22-8533-C725A455CF9C(a)microsoft.com...
> "Pavel A." wrote:
>
>> "JY" <sd(a)nospamgroup.com> wrote in message
>> news:D8658354-5EF6-4054-9790-C01FDF31DDCD(a)microsoft.com...
>> > Hi,
>> >
>> > As I'd mentioned in an earleir post, I'm using DIFxAPIs
>> > (DriverPackagePreinstall) to pre-install a driver in a Windows based
>> > application.
>> >
>> > The scenario is as follows:
>> > 1. User brings up application.
>> > 2. Driver is pre-installed (SW first)
>> > 3. User plugs-in USB device
>> > 4. Windows should now install the pre-installed driver. But somehow
>> > this
>> > is
>> > not happening sometimes (on XP, Vista and 7). I have to go to the
>> > Device
>> > Manager and say Update driver.
>> >
>> > How do I force Windows to load (install) the pre-installled drvier?
>>
>> Sign your driver, so that it has the highest range.
>
> I have to deal with unsigned drivers sometimes. The drivers are provided
> to
> us by a client and it is absolutely necessary to use unsigned drivers too.
> Signing the driver is not a solution.