Deloy window audio driver to MSI file

Hi all,

I would like to deloy a windows audio driver to MSI file to deploy.
I’m trying to use custom action in visual studio setup project to run a script to install INF driver file.

But I can’t install INF driver by command line (as well as right click/install). I tried to use pnputil, setupapi.dll, advpack.dll, and it did not work. The response is SUCCESS but nothing is installed. I got same problem with sample project sysvad.
When developing, my inf file was installed by devcon install, and it worked normaly.
I also tried to add DefaultInstall section (remove Manufacturer section) to inx file, but nothing change (response success and nothing installed)

I think the error is “Unable to find any matching devices” . This error appears when installing a new driver. In case of existing driver, the message is “Device does not need an update”, “No devices were updated”

What should I do? Thanks for advance

log for right click/install 
...  [Device Install (DiInstallDriver) - D:\SimpleAudioSample.inf]
...  Section start 2021/04/15 09:54:05.508
      cmd: "C:\WINDOWS\System32\InfDefaultInstall.exe" "D:\SimpleAudioSample.inf"
     ndv: Flags: 0x00000000
     ndv: INF path: D:\SimpleAudioSample.inf
     dvs: {DrvSetupInstallDriver - D:\SimpleAudioSample.inf}
     dvs:      Flags: 0x00000000
     dvs:      {Driver Setup Import Driver Package: D:\SimpleAudioSample.inf} 09:54:05.514
     inf:           Opened INF: 'D:\SimpleAudioSample.inf' ([strings])
     dvs:           Driver package already imported as 'oem152.inf'.
     inf:           Opened INF: 'D:\SimpleAudioSample.inf' ([strings])
     inf:           Opened INF: 'C:\WINDOWS\INF\ks.inf' ([strings])
     inf:           Opened INF: 'C:\WINDOWS\INF\wdmaudio.inf' ([strings])
     inf:           Opened INF: 'D:\SimpleAudioSample.inf' ([strings])
     inf:           Opened INF: 'C:\WINDOWS\System32\DriverStore\FileRepository\simpleaudiosample.inf_amd64_9bbab47f808f6edc\simpleaudiosample.inf' ([strings])
     dvs:      {Driver Setup Import Driver Package - exit (0x00000000)} 09:54:05.607
!    dvs:      Unable to find any matching devices.
     dvs: {DrvSetupInstallDriver - exit(00000000)}
...  Section end 2021/04/15 09:54:05.627
...  [Exit status: SUCCESS]
log for SETUPAPI.DLL in setupapi.app.log
...  [Install INF Section (InstallHInfSection) - SimpleAudioSample.inf]
...  Section start 2021/04/15 09:36:24.994
      cmd: RUNDLL32.EXE  SETUPAPI.DLL,InstallHinfSection DefaultInstall 128 D:\SimpleAudioSample.inf
     inf: INF     - D:\SimpleAudioSample.inf
     inf: Section - DefaultInstall
     inf: Mode    - 128
     inf: Opened INF: 'D:\SimpleAudioSample.inf' ([strings])
     inf: Primitive INF requirements not met, processing INF as a legacy driver
     inf: Installing section [DefaultInstall] from 'D:\SimpleAudioSample.inf'.
     inf: {Install Inf Section [DefaultInstall]}
     inf: {Install Inf Section [DefaultInstall] exit (0x00000000)}
     flq: {FILE_QUEUE_COMMIT} 09:36:25.003
     flq:      No operations queued.
     flq: {FILE_QUEUE_COMMIT - exit(0x00000000)} 09:36:25.004
     inf: {Install Inf Section [DefaultInstall]}
     inf:      {Install from INF Section - DefaultInstall} 09:36:25.005
     inf:           Flags         - 0x000007ef
     inf:           Reference Key - 0
     inf:           Source root   - (null)
     inf:           Copy flags    - 0x000007ef
     inf:      {Install from INF Section - exit(0x00000000)} 09:36:25.008
     inf: {Install Inf Section [DefaultInstall] exit (0x00000000)}
...  Section end 2021/04/15 09:36:25.726
...  [Exit status: SUCCESS]
log for pnputil in setupapi.dev.log
...  [Driver Install (DrvSetupInstallDriver) - D:\SimpleAudioSample.inf]
...  Section start 2021/04/15 09:39:56.790
      cmd: pnputil  -i -a D:\SimpleAudioSample.inf
     dvs: Flags: 0x00000000
     dvs: {Driver Setup Import Driver Package: D:\SimpleAudioSample.inf} 09:39:56.792
     inf:      Opened INF: 'D:\SimpleAudioSample.inf' ([strings])
     dvs:      Driver package already imported as 'oem152.inf'.
     inf:      Opened INF: 'D:\SimpleAudioSample.inf' ([strings])
     inf:      Opened INF: 'C:\WINDOWS\INF\ks.inf' ([strings])
     inf:      Opened INF: 'C:\WINDOWS\INF\wdmaudio.inf' ([strings])
     inf:      Opened INF: 'D:\SimpleAudioSample.inf' ([strings])
     inf:      Opened INF: 'C:\WINDOWS\System32\DriverStore\FileRepository\simpleaudiosample.inf_amd64_9bbab47f808f6edc\simpleaudiosample.inf' ([strings])
     dvs: {Driver Setup Import Driver Package - exit (0x00000000)} 09:39:56.818
!    dvs: Unable to find any matching devices.
...  Section end 2021/04/15 09:39:56.833
...  [Exit status: SUCCESS]
log for advpack in setupapi.dev.log
...  [SetupInstallFromInfSection - SIMPLEAUDIOSAMPLE.NT$ARCH$]
...  Section start 2021/04/15 09:41:36.257
      cmd: rundll32.exe  advpack.dll,LaunchINFSectionEx D:\SimpleAudioSample.inf,SIMPLEAUDIOSAMPLE.NT$ARCH$,,4,N
     inf: Flags         - 0x00000010
     inf: Reference Key - 7
     inf: Source root   - D:
     inf: Copy flags    - 0x00000010
     flq: {FILE_QUEUE_COMMIT} 09:41:36.260
     flq:      No operations queued.
     flq: {FILE_QUEUE_COMMIT - exit(0x00000000)} 09:41:36.262
...  Section end 2021/04/15 09:41:36.263
...  [Exit status: SUCCESS]

...  [SetupInstallFromInfSection - SIMPLEAUDIOSAMPLE.NT$ARCH$]
...  Section start 2021/04/15 09:41:36.264
      cmd: rundll32.exe  advpack.dll,LaunchINFSectionEx D:\SimpleAudioSample.inf,SIMPLEAUDIOSAMPLE.NT$ARCH$,,4,N
     inf: Flags         - 0x00000106
     inf: Reference Key - 7
     inf: Source root   - (null)
     inf: Copy flags    - 0x00000106
...  Section end 2021/04/15 09:41:36.266
...  [Exit status: SUCCESS]

Did you include a [DeviceInstall32] section in your INF to tell folks what root-enumerated object you want to create? devcon install will go probing to figure that out, but the other tools don’t necessarily do that. This really is a PnP device, right? The [DefaultInstall] section is not the right way to handle that. You need to add a devnode and then let the device manager do its thing to find your INF.