Windows Driver Matching

Source: Internet
Author: User

Under Windows, almost all of the hardware devices need to install the driver to work properly, we reinstall the system after the first thing is to install the driver for each device, we can download the official driver manual installation, you can also let me windows automatic scanning installation, but also use the Driver wizard, The computer steward and other tools to help us install, in order to play the best performance of hardware equipment, we also need to promptly upgrade the driver to the latest version. So how do these tools match the hardware devices to the best drivers? This article is a probe into the problem.

Drive Match Related information

Devices are identified by the hardware ID, a device typically has multiple hardware IDs and compatible IDs, which in turn degrade the identity of the device in order, and we can see the hardware ID and compatibility ID of the device in Windows Device Manager.

Drivers under Windows must contain an information file (INF) for installation, and INF text files contain all the information necessary to install drivers for device installation components. The information required to drive the match can be extracted from the INF file:

(1) Driver provider

(2) Drive type

(3) Date and version of the drive

(4) The characteristic value of the drive, which is used to measure the degree of support of the drive to the device characteristics

(5) Driver-supported operating system version and hardware platform

(6) Hardware ID and compatible ID of the driver-supported device

Device and driver identity matching means that the hardware ID or compatible ID of the device matches the hardware ID or compatible ID specified by the drive INF file, and the matching level from high to low has the following 4 types:

(1) The hardware ID of the device matches the hardware ID of the INF, and the matching degree is determined by the location of the device's hardware ID.

(2) The hardware ID of the device matches the compatible ID of the INF, and the matching degree is determined by the location of the device's hardware ID.

(3) The compatible ID of the device matches the hardware ID of the INF, and the matching degree is determined by the location of the device's compatible ID.

(4) The compatible ID of the device matches the compatible ID of the INF, and the matching degree is determined by the location of the device's compatible ID and the location of the INF's compatible ID, which has a higher priority.

Driver signatures also play a key role in driver matching, and the ordering of signatures is prioritized as follows:

(1) signed by Microsoft, including:

* WHQL Signature of priority level (Premium) and Standard level (STANDRD);

* Inbox driver Signature (Signatures for Inbox drivers);

* Reliable driver signature (DRS, Driver reliability Signature);

* SE signature (Windows sustained Engineering);

* Old version of Windows WHQL signature;

(2) A valid code signature, the system administrator can set the security policy to specify the trusted root certificate issued by the Microsoft Code Signing certificate signed equivalent to the Microsoft signature;

(3) driver without signature, but INF ddinstall. nt suffix;

(4) driver without signature, but not in INF ddinstall. NT suffix;

(5) There is no signature or signature problem and cannot confirm whether there is a signed driver.

Driver matching Rules

The driver installation tool stores a large number of drivers on the server side, and it is possible to have multiple drivers for the same device, so which is the best one? The driver matches the following matching rules to select the best driver:

(1) An ordered list of the device ID (Hardware ID and compatible ID) that the client escalated, the operating system version, and the hardware platform.

(2) combined with the device ID, operating system version, hardware platform and the driver library to match, get all the available drivers, if no driver available, then the match failed.

(3) Select the best driver for the signature.

(4) Select the driver with the best characteristics.

(5) Select the best driver for the matching type.

(6) Select the latest driver for the date.

(7) Select the driver with the highest version.

(8) Select any driver.

Drive Information Extraction Method

Previously mentioned that the driver support hardware and other information are stored in the INF file, in order to be able to quickly match the driver, it is necessary to extract the information from the INF file, the following detailed description of the drive information extraction method

1. Extraction of basic information

The Version section appears at the beginning of the INF file, and each INF file must contain this section.

[Version]

Signature= "Signature-name"

[Class=class-name]

[CLASSGUID={NNNNNNNN-NNNN-NNNN-NNNN-NNNNNNNNNNNN}]

[provider=%inf-creator%]

[Layoutfile=filename.inf [, Filename.inf] ...] (Windows $ and Windows XP)

[Catalogfile=filename.cat]

[Catalogfile.nt=unique-filename.cat]

[Catalogfile.ntx86=unique-filename.cat]

[Catalogfile.ntia64=unique-filename.cat] (Windows XP and later versions of Windows)

[Catalogfile.ntamd64=unique-filename.cat] (Windows XP and later versions of Windows)

DRIVERVER=MM/DD/YYYY[,W.X.Y.Z]

[Dontreflectoffline=1] (Windows Vista and later versions of Windows)

[Pnplockdown=0|1] (Windows Vista and later versions of Windows)

[driverpackagedisplayname=%driver-package-description%]

[Driverpackagetype=packagetype]

(1) signature must be $windows nt$ or $chicago$, indicating that it is available under all Windows systems.

(2) class specifies the type of device to install the drive using the INF file, for more information about the type reference http://msdn.microsoft.com/en-us/library/windows/hardware/ff553426 (v= vs.85). aspx

(3) Provider The provider of the specified driver,%inf-creator% is defined in the strings section.

(4) DriverVer specifies the date and version of the drive. The date is the most recent date for all files, the format of the date is mm/dd/yyyy or MM-DD-YYYY, the year must contain 4 numbers, the month and day must contain 2 numbers, the version w.x.y.z is optional, if the version is specified, W is required, x, Y, Z are optional, W, X, Y, Z are integers greater than or equal to 0 less than 65535. Starting with Windows 2000, the INF file must contain DriverVer in the version section, specifying versioning information for the entire INF, and DDInstall sections can also contain DriverVer, which is more explicit and higher priority than the former.

(5) Driverpackagedisplayname Specifies the name of the driver display,%driver-package-description% defined in the strings section.

(6) Driverpackagetype specifies the type of drive.

2. Device ID, operating system, hardware platform, drive feature extraction

(1) Extract all models section name from manufacturer.

[Manufacturer]

Manufacturer-identifier

[Manufacturer-identifier]

[Manufacturer-identifier]

...

The Manufacturer-identifier format is as follows:

Manufacturer-name |

%strkey%=models-section-name |

%strkey%=models-section-name [, TargetOsVersion] [, TargetOsVersion] ... (Windows XP and later versions of Windows)

Extract Manufacturer-name or Models-section-name as the models section name.

(2) TargetOsVersion extraction Rules

nt[architecture][.[ osmajorversion][.[ osminorversion][.[ producttype][. Suitemask] []]

NT specifies that the operating system is NT-based, and Windows 2000 and later versions are NT-based.

ARCHITECTURE Specifies the hardware platform, if specified, must be x86, IA64, or AMD64. Windows Server 2003 SP1 previous version, if architecture not specified, the Model section can be used on any hardware platform, Windows Server 2003 SP1 and later versions, Non-x86 operating systems must specify that the Architecture,x86 operating system is optional.

The major version number of the Osminorversion operating system.

Windows version

Major version

Windows 8

6

Windows Server R2

6

Windows 7

6

Windows Server 2008

6

Windows Vista

6

Windows Server 2003 R2

5

Windows Server 2003

5

Windows XP

5

Windows 2000

5

The child version number of the Osminorversion operating system.

Windows version

Minor version

Windows 8

2

Windows Server R2

1

Windows 7

1

Windows Server 2008

0

Windows Vista

0

Windows Server 2003 R2

2

Windows Server 2003

2

Windows XP

1

Windows 2000

0

ProductType the ver_nt_xxxx defined in the Winnt.h file, if specified, the ProductType of the operating system must match.

Suitemask the ver_suite_xxxx defined in the Winnt.h file, if specified, the suitemask of the operating system must match.

The extraction rules for TargetOsVersion are as follows:

1) targetosversion if specified, must start with NT

2) TargetOsVersion Architecture if specified, the specified hardware platform, if not specified, for Windows Server 2003 SP1 Previous version of the operating system, for any hardware platform, for Windows Server 2003 SP1 and later versions of the operating system for the x86 hardware platform.

3) TargetOsVersion's osmajorversion[. Osminorversion] Specifies the minimum version of the operating system to which the section applies, and Osminorversion is 0 if osmajorversion specified and osminorversion unspecified If both osmajorversion and osminorversion are not specified, Windows 2000 and later are all versions.

(3) Extract OS version from model section, hardware platform, device ID, device description, DDInstall section name

[Models-section-name] |

[Models-section-name. TargetOsVersion] (Windows XP and later versions of Windows)

Device-description=install-section-name[,hw-id][,compatible-id ...]

[Device-description=install-section-name[,hw-id][,compatible-id] ...] ...

A models-section-name may have multiple models sections, with different targetosversion, each with a models The OS version of section and the hardware platform need to be combined with all the same names (named Models-section-name. [TargetOsVersion]) section determines the following rules:

1) Obtain the operating system version range and hardware platform for each section according to the extraction rules of targetosversion.

2) for any section, under the same hardware platform, if there is an intersection between any two versions of a section with the same name, remove the intersection from the lower starting version of the interval, whichever is the high starting version.

Extracts a specified device from each row of the model section, Device-description is the device description, Hw-id is the hardware ID, Compatible-id is the compatible ID, Install-section-name is the DDInstall section name that corresponds to the device.

(3) Extract the drive feature and driver version for a device from the DDInstall section name.

[Install-section-name] |

[Install-section-name.nt] |

[Install-section-name.ntx86] |

[Install-section-name.ntia64] | (Windows XP and later versions of Windows)

[Install-section-name.ntamd64] (Windows XP and later versions of Windows)

[Driverver=mm/dd/yyyy[,x.y.v.z]]

...

[Featurescore=featurescore] ... (Windows Vista and later versions of Windows)

The Install-section-name and Install-section-name.nt are suitable for all hardware platforms, and others for the specified hardware platform.

Extract the driver from DriverVer the version that corresponds to a device under a specified hardware platform, and the rule extracts DriverVer from version section.

Extracting a driver from a featurescore that corresponds to a device's characteristic value under a specified hardware platform, the smaller the value, the better the supported feature.

3. multiple inf files

Extracts all INF files by extracting the information in each INF unit.

Reference documents

http://msdn.microsoft.com/en-us/library/windows/hardware/ff546228 (v=vs.85). aspx

Windows Driver Matching

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.