0

After installing my driver, the virtual device should be created (Win 10).

When I install the driver in the first way:

devcon install INFfile HardwareID

everything is fine, the installation is successful, the virtual device is created, I can see it in the device manager.

But when I use the other way:

pnputil /add-driver INFfile /install

the installation is successful, but the device is not created.

I want to use pnputil utility because devcon is deprecated. What could be the problem?

1 Answers1

1

As stated on the Microsoft Learn website, you should first run the devgen command:

devgen /add /bus ROOT /hardwareid HardwareID
pnputil /add-driver INFfile /install
Atercat
  • 99
  • 5
  • It really is. I saw it but didn't believe it. I want to use the utility in script-driven installer authoring tool. It seems to me that the devgen and pnputil utilities instead of devcon make things harder for me. Documentation says: "DevGen.exe can be found in the tools folder of the WDK starting in Windows 11, version 22H2. It allows an administrator create and remove software devices and root enumerated devices for testing purposes." – Denis Yarullin Jul 13 '23 at 10:57
  • Devcon is also non-built-in tool. So why is it harder to use devgen? – Atercat Jul 14 '23 at 10:10
  • I need to use two utilities instead of one and include them in the installer. – Denis Yarullin Jul 16 '23 at 20:38
  • But pnputil is a built-in program. I believe there is no need to add it to the installer. – Atercat Jul 17 '23 at 05:52
  • It's true, but it's better to avoid the risk. – Denis Yarullin Jul 17 '23 at 10:01