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.

Windows for business | Windows Client for IT Pros | Devices and deployment | Set up upgrades and drivers
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Darth Tester 20 Reputation points
    2025-12-05T15:10:46.89+00:00

    Yes, the registry entries are created, but into a different path, for instance:

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class{990a2bd7-e738-46c7-b26f-1cf8fb9f1391}\0000\SOFTWARE\Microsoft\Cryptography\Calais\SmartCards

    Try to search your driver's name on registry editor starting from HKEY_LOCAL_MACHINE and you will find them.

    When you use HKR, the path where registry entries are created changes, but you did not change the path you read from.

    There is no choice, you have to touch driver source code.

    I don't know still how, but here you are some clues:

    https://stackoverflow.com/questions/79305509/how-to-resolve-found-legacy-addreg-operation-using-non-relative-key-error-duri

    Hope this helps.

    0 comments No comments

Your answer

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