c++ – SetupAPI.dll InstallHinfSection Yields “Installation Failed” and No Entry in setupapi.dev.log


I built a newly created KMDF driver using Visual Studio and tried to install it. That yielded the “Installation Failed” error message.

My driver and the default are virtually identical. I changed the manufacturer name. Here is a screenshot showing the new project dialog.

Visual Studio 2022 New KMDF

Error Message

SetupAPI.dll Installation Failed Error Message

What bothers me is not so much the error message, but that the log file has no entries. I do not have any information beyond “Installation Failed” and that the SetupAPI.dll definitely showed that message box.

Command Line, ran on a Windows 10 with all updates VM. Dev box is also Win10.

“C:\Windows\System32\rundll32.exe” C:\Windows\System32\SETUPAPI.DLL,InstallHinfSection vs22drv_Device 128 C:\Users\Me\Downloads\vs22drv\vs22drv.inf

Oh, I tried using PsExec too, but that did not make any difference.

“C:\Users\ICS\Downloads\PsExec.exe” -i -d RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection vs22drv_Device 128 C:\Users\ICS\Downloads\vs22drv\vs22drv.inf

I signed the driver using my DigiCert EV code signing certificate. I manually verified the signature, so that is not the issue.

I tried many several times since 8:00 AM, when I last rebooted my VM. I tried on my development box and that has the same error. I tried building a few drivers from the WDK sample and the same.

Here is the setupapi.dll log file showing no new entries.

setupapi.dll log file location

Here is a screenshot showing no entries of my attempts to install the driver.

contents of setupapi.dll log file showing no entries of my attempts

I did match up the installation section in the INF with what I specified in the command line.

Corresponding KMDF INF File

QUESTION:

  1. How do I see what the actual complaint is, so that I can fix it.
  2. What is my problem?

Leave a Reply

Your email address will not be published. Required fields are marked *