Windows Update Logic for Offering a Driver - 7

Windows Update Logic for Offering a Driver

August 6, 2007

Abstract

This paper provides information about how Windows Update chooses drivers for the Microsoft® Windows® family of operating systems.

This information applies for the following operating systems:
Windows Server® 2008
Windows Vista®
Windows Server 2003
Windows XP

The current version of this paper is maintained on the Web at:
http://www.microsoft.com/whdc/maintain/WU_logic.mspx

Contents

Introduction 3

Printers versus All Other Devices 3

DriverVerVersion Ranking 3

FeatureScore 4

Windows Update Driver Install Flowcharts 5

Disclaimer

This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.

Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, email address, logo, person, place or event is intended or should be inferred.

© 2007 Microsoft Corporation. All rights reserved.

Microsoft, Windows, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

Introduction

Windows® Update (WU) follows the basic rules of Plug and Play to determine if a driver update should be offered to a user. Windows Update ignores several aspects of ranking in Plug and Play, and can do this only because the drivers on WU always have the preferred aspects of an ignored rule.

For example, Plug and Play always prefers a signed driver over an unsigned driver, regardless of what hardwareID is being matched or how old the signed driver is. WU ignores this ranking item because all driver content on WU is signed. This, however, means that a signed driver may not be offered to a user with an unsigned driver, even though by Plug and Play ranking the signed driver is a better match.

Another item ignored by WU is INF compatibleIDs. This is where hardwareID is listed in the INF as a compatibleID, which is ranked worse than INF hardwareIDs. Note: INF compatibleIDs should not be confused with hardware compatibleIDs.

All drivers posted to WU are posted with INF hardwareIDs.

Printers versus All Other Devices

Printer drivers on WU have special detection logic not applicable to nonprinter devices. This is due to the same physical printer device being compatible with different driver models.

For example, a printer device can use the Adobe Postscript driver, the Microsoft UniDriver, or a custom built driver from the manufacturer (called a monolithic driver).

A user running the Postscript driver most likely does not want the monolithic driver offered to them by Windows Update because updating with a different driver model may break applications or cause the print spooler to behave differently.

A user running the monolithic driver will want the updated monolithic driver if the updated driver is newer and better.

To prevent a driver from one driver model from overwriting a driver from a different driver model, Windows Update checks to see that the INF manufacturer, model, and provider strings from both the WU driver and the installed driver match. If these strings do not match, then WU does not offer the driver update. This additional logic can be seen in Figures3 and4.

DriverVerVersion Ranking

Ranking using the INF DriverVerVersion information was introduced in Windows XP Service Pack1. Before XP SP1, the DriverVerVersion did not affect whether one driver was newer than another driver.

The DriverVerVersion field in the INF is an optional field and consists of four optional ordinals. Each ordinal consists of an unsigned 16-bit integer (0 to 65536):

Example: 1.30.255

The four ordinals are specified from most significant to least significant. The preceding DriverVerVersion is the equivalent of 1.30.255.0.

To compare two DriverVerVersions, the values are converted to unsigned 64bit integers and then compared.

Figure 1. Converting a DriverVerVersion to an uInt64

0000 0000 0000 0001 0000 0000 0001 1110 0000 0000 1111 1111 0000 0000 0000 0000 = 281603842441216

FeatureScore

FeatureScore is a new ranking item introduced in Windows Vista® that causes a driver with a lower featurescore value to be preferred over a driver with a higher featurescore.

Currently, only the display team uses featurescore ranking. If the featurescore value is not specific in the INF file, the score defaults to 0xFF.

Currently, Windows Update does not recognize featurescore ranking, which may result in drivers failing to install from Windows Update.

Windows Update Driver Installation Flowcharts

Figure 2. Windows XP Service Pack 1 or Greater Nonprinter

Figure 3. Windows 2000 and Windows XP RTM Printer

Figure 4. Windows XP Service Pack 1 or Greater Printer

August 6, 2007
© 2007 Microsoft Corporation. All rights reserved.