INF Driver Versioning

On 5/19/2009, Hagen Patzke wrote:

This is what I remember from my WinXP and Vista USB install tests:

The “Driver” entry in Device Manager will not be updated -
nor will the
device name as displayed in device manager - if you don’t remove a
device class completely from the Windows installation (*) but just
update the driver (using a newer INF file).

On 5/20/2009 2:57 AM, Michal Vodicka wrote:

Sorry, that’s not right. This entry is updated after successful driver
update. Nothing needs to be removed. You’re right it may not be the same
version as the current binary (which can be changed) but it is the
version from INF from the last driver installed correct way via DM or
Setup API. I just have a pleasure to work with this API from the hell
and this part seems to work correctly (at least at XP SP3 and Win7).

Thanks for the info, Michal - I remember pulling some hair out when
testing in 2006/2007: updating the version number (DriverVer) in the INF
file did not always help, also my new device name was not always
displayed, if a device class entry with the same ClassGUID already
existed before, also the device icon was not updated (Vista only).

The information was always correctly updated on a fresh install - only
when updating an existing driver I noticed the described behaviour.

Hmmm… for device name and icon, this MSDN entry seems to back my memory:

http://msdn.microsoft.com/en-us/library/ms794537.aspx

“Because the system processes a ClassInstall32 section only if a class
is not already installed, you cannot use a ClassInstall32 section to
reinstall or change the settings for a class that is already installed.”

[Guess what’s in the ClassInstall32 section? The AddReg directive for
driver name and icon. :-)]

Next possibility I’ll have to re-check that DriverVer updates the driver
version displayed on the first device manager info page.

On 5/19/2009 2:11 PM, WH Tan wrote:

2009/5/19 Hagen Patzke wrote>:
> (*)which AFAIK only from Vista you can do with a standard dialog
> (checkbox “delete driver from drive” or something), otherwise you have
> to do it manually

Hello Hagen,

I forgot to mention in my previous message that I actually did
something manually - right-clicked on the device in device manager
device list and chose uninstall. I’m not sure what happens behind the
scene after that, but probably what happens is what you referred as
remove-device-class?

No, that’s not enough “manual” work. :slight_smile:

In XP, “Uninstall” uninstalls the current driver but does not
necessarily remove the device class. It also does not delete the driver
backup packages from C:\Windows\INF.

On Vista, there is an additional Checkbox (IIRC labeled “Delete driver
binary” or something like that).
After e.g. three installs/updates, uninstalling three times with this
option enabled recognized a device as completely new when re-plugging.

On XP, for my USB tests to re-create an install state of a “clean”
system, after driver uninstall, I manually deleted the INF/PNF files
from C:\Windows\INF, and also the driver registry entries (including
“enum”).

Note: Information applies to my tests in 2006/2007. Newer OS versions or
SPs behaviour can vary.