Force KMDF update

Hello,
I’m new here and i hope that someone can help me :smiley:

I wanted to know if there is any “good” way to force a KMDF update in a software first installation.

The problem is the following:
When a customer installs our driver (for a USB device, KMDF 1.9) on a fresh Windows Vista x64 OS, the PC has to be restarted because of a KMDF update.
This is OK but the KMDF update only occurs if one of our devices is connected to the PC. So, if the user hasn’t connected a matching interface for the driver he is installing, the driver won’t be loaded and thus the KMDF version won’t be updated. But it will be updated as soon as the user connects an matching interface for the first time.
I think that it’s a bad user experience if you have to restart the PC when you connect a device (because you need it atm) regardless of the fact that you had already installed the driver some months ago. :frowning:

I already tried the WdfPreDeviceInstallEx function (from the nonpnp example) and it works (it updates the KMDF version immediately without any interfaces connected) but i don’t want to use the function because i don’t know if it does anything else (or if it will do something else if the KMDF version is already updated).
I’m also thinking about extracting the installers from the WdfCoInstaller01009.dll and call them directly from the driver installer but i don’t like this solution too. It would be a big memory waste to ship the KMDF installers twice (inside and outside of the coinstaller dll).

Is there any way to force a KMDF update?
Maybe by loading the driver without a matching interface connected to the system so the KMDF version would be updated automatically?
Or is there any function inside of the dll which checks the KMDF version and updates it if needed without doing anything else?

The installer calls DriverPackagePreinstall followed by DriverPackageInstall to install the driver.

Thanks in advance,
Daniel

WdfPreDeviceInstallEx does exactly what you want, it just installs the runtime, nothing more.

d

dent from a phpne with no keynoard

-----Original Message-----
From: xxxxx@ems-wuensche.com
Sent: October 19, 2010 2:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Force KMDF update

Hello,
I’m new here and i hope that someone can help me :smiley:

I wanted to know if there is any “good” way to force a KMDF update in a software first installation.

The problem is the following:
When a customer installs our driver (for a USB device, KMDF 1.9) on a fresh Windows Vista x64 OS, the PC has to be restarted because of a KMDF update.
This is OK but the KMDF update only occurs if one of our devices is connected to the PC. So, if the user hasn’t connected a matching interface for the driver he is installing, the driver won’t be loaded and thus the KMDF version won’t be updated. But it will be updated as soon as the user connects an matching interface for the first time.
I think that it’s a bad user experience if you have to restart the PC when you connect a device (because you need it atm) regardless of the fact that you had already installed the driver some months ago. :frowning:

I already tried the WdfPreDeviceInstallEx function (from the nonpnp example) and it works (it updates the KMDF version immediately without any interfaces connected) but i don’t want to use the function because i don’t know if it does anything else (or if it will do something else if the KMDF version is already updated).
I’m also thinking about extracting the installers from the WdfCoInstaller01009.dll and call them directly from the driver installer but i don’t like this solution too. It would be a big memory waste to ship the KMDF installers twice (inside and outside of the coinstaller dll).

Is there any way to force a KMDF update?
Maybe by loading the driver without a matching interface connected to the system so the KMDF version would be updated automatically?
Or is there any function inside of the dll which checks the KMDF version and updates it if needed without doing anything else?

The installer calls DriverPackagePreinstall followed by DriverPackageInstall to install the driver.

Thanks in advance,
Daniel


NTDEV is sponsored by OSR

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

WdfPreInstallDeviceEx was the right thing to do- it updates the framework if it needs it, and you can control whether it reboots then or else it just tells you it needs a reboot. I don’t see you mentioning any reason not to just use it as is.

Out of curiosity, was there a reason you didn’t simply ask if it did anything else?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@ems-wuensche.com
Sent: Tuesday, October 19, 2010 2:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Force KMDF update

Hello,
I’m new here and i hope that someone can help me :smiley:

I wanted to know if there is any “good” way to force a KMDF update in a software first installation.

The problem is the following:
When a customer installs our driver (for a USB device, KMDF 1.9) on a fresh Windows Vista x64 OS, the PC has to be restarted because of a KMDF update.
This is OK but the KMDF update only occurs if one of our devices is connected to the PC. So, if the user hasn’t connected a matching interface for the driver he is installing, the driver won’t be loaded and thus the KMDF version won’t be updated. But it will be updated as soon as the user connects an matching interface for the first time.
I think that it’s a bad user experience if you have to restart the PC when you connect a device (because you need it atm) regardless of the fact that you had already installed the driver some months ago. :frowning:

I already tried the WdfPreDeviceInstallEx function (from the nonpnp example) and it works (it updates the KMDF version immediately without any interfaces connected) but i don’t want to use the function because i don’t know if it does anything else (or if it will do something else if the KMDF version is already updated).
I’m also thinking about extracting the installers from the WdfCoInstaller01009.dll and call them directly from the driver installer but i don’t like this solution too. It would be a big memory waste to ship the KMDF installers twice (inside and outside of the coinstaller dll).

Is there any way to force a KMDF update?
Maybe by loading the driver without a matching interface connected to the system so the KMDF version would be updated automatically?
Or is there any function inside of the dll which checks the KMDF version and updates it if needed without doing anything else?

The installer calls DriverPackagePreinstall followed by DriverPackageInstall to install the driver.

Thanks in advance,
Daniel

Thanks for the help :smiley:

Out of curiosity, was there a reason you didn’t simply ask if it did anything else?

Why doing something the simple way, when there is a hard one :wink:

You’re right, there wasn’t any reason for me to write so mucht text instead of asking a simple question :frowning:

I will consider this on future questions :slight_smile:
(Hopefully)

Thanks again,
Daniel