Registry Configuration to Ensure Driver Automatically Loads on Windows 11 HLK

LA_DEV_QA 0 Reputation points
2024-12-24T03:40:57.96+00:00

Using the Infverif.exe tool from WDK 10.0.22621 on Windows 11 24H2 Build 26100 to verify an INF file, the following command is executed:

Steps executed to run the test:

  1. Open command prompt.
  2. Navigate to the WDK tools installation path.
  3. Execute the command infverif.exe /u "absolute inf file path"

For the INF AddReg directive section, entries have been created as follows:

HKLM, %SmartCardName%
HKLM, %SmartCardName%,"ValueName1",0x00000001,"ValueData1" 
HKLM, %SmartCardName%,"ValueName2",0x00000001,"ValueData2"

Upon validation with the infverif.exe tool, an error code "1304" and the error is "Found legacy AddReg operation using non-relative key"

After changing the non-relative key to a relative key (HKR), infverif.exe successfully passes the validation of the INF file. However, the driver automatic load fails, resulting in the particular registry entries not being created anymore.

The goal is to configure the INF file so that it passes validation and enables the driver to load automatically without issues when the HKLM is replaced with HKR. Guidance on achieving this configuration would be appreciated.

Driver Quality Tools
Driver Quality Tools
a set of tools that aid driver developers in finding, diagnosing, and fixing bugs in their drivers.
9 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.