moufiltr sample: Destination file path not isolated to DIRID 13; installation fails

I used the moufiltr sample and made small changes to the .inf (posted below) to make it work for HID mouses.

However, InfVerif.exe /v /w tells me that the Destination file path must be isolated to DIRID 13.

Also, installing the driver using “Update Driver” in DevMgmt shows the error “The folder you specified doesn’t contain a compatible software driver for your device.”

Will it break something when I just change the DIRID in Line 13 and 62 to 13?

L001 [Version]
L002 Signature=“$Windows NT$”
L003 Provider=%ProviderName%
L004 ClassGUID={4D36E96F-E325-11CE-BFC1-08002BE10318}
L005 Class=Mouse
L006 DriverVer = 03/29/2022,2.44.12.961
L007 ; Uncomment the following line when you have a valid catalog file.
L008 ; If you use bogus catalog file installation will fail.
L009 CatalogFile=KmdfSamples.cat
L010 PnpLockDown=1
L011
L012 [DestinationDirs]
L013 DefaultDestDir = 12
L014 moufiltr_CoInstaller_CopyFiles = 11
L015
L016 ;
L017 ; Driver information
L018 ;
L019
L020 [Manufacturer]
L021 %MfgName% = Standard,NTx86
L022
L023 [Standard.NTx86]
L024 %moufiltr.DeviceDesc% = moufiltr, HID_DEVICE_SYSTEM_MOUSE ; *PNP0FAKE
L025
L026 ;
L027 ; General installation section
L028 ;
L029
L030 [moufiltr.NT]
L031 ; perform port related actions from mouse.inf
L032 Include=msmouse.inf
L033 Needs=HID_Mouse_Inst
L034
L035 ; Copy the driver over
L036 CopyFiles=moufiltr.CopyFiles
L037
L038
L039 ;
L040 ; File sections
L041 ;
L042
L043 [moufiltr.CopyFiles]
L044 moufiltr.sys
L045
L046
L047 ;
L048 ; Service Installation
L049 ;
L050
L051 [moufiltr.NT.Services]
L052 AddService = mouse_control, , moufiltr_Service_Inst
L053 ; Install the port driver and mouclass from msmouse.inf
L054 Include=msmouse.inf
L055 Needs=HID_Mouse_Inst.NT.Services
L056
L057 [moufiltr_Service_Inst]
L058 DisplayName = %moufiltr.SvcDesc%
L059 ServiceType = 1 ; SERVICE_KERNEL_DRIVER
L060 StartType = 3 ; SERVICE_DEMAND_START
L061 ErrorControl = 0 ; SERVICE_ERROR_IGNORE
L062 ServiceBinary = %12%\moufiltr.sys
L063
L064 [moufiltr.NT.HW]
L065 ; Add the device upper filter
L066 AddReg = moufiltr.HW.AddReg
L067
L068 ; run the directives need by the port driver
L069 Include=msmouse.inf
L070 Needs=HID_Mouse_Inst.NT.HW
L071
L072 [moufiltr.HW.AddReg]
L073 HKR,“UpperFilters”,0x00010000,“moufiltr”
L074
L075
L076 ;
L077 ; Source file information
L078 ;
L079
L080
L081 [SourceDisksNames]
L082 1 = %DiskId1%,
L083
L084 [SourceDisksFiles]
L085 moufiltr.sys = 1
L086 ;
L087
L088
L089 ;
L090 ;— moufiltr Coinstaller installation ------
L091 ;
L092
L093 [moufiltr.NT.CoInstallers]
L094 AddReg=moufiltr_CoInstaller_AddReg
L095 CopyFiles=moufiltr_CoInstaller_CopyFiles
L096
L097 [moufiltr_CoInstaller_AddReg]
L098 ;
L099
L100
L101 [moufiltr_CoInstaller_CopyFiles]
L102 ;
L103
L104
L105 [moufiltr.NT.Wdf]
L106 KmdfService = moufiltr, moufiltr_wdfsect
L107
L108 [moufiltr_wdfsect]
L109 KmdfLibraryVersion = 1.15
L110
L111
L112 [Strings]
L113
L114 ;
L115 ; Non-Localizable Strings
L116 ;
L117
L118 REG_SZ = 0x00000000
L119 REG_MULTI_SZ = 0x00010000
L120 REG_EXPAND_SZ = 0x00020000
L121 REG_BINARY = 0x00000001
L122 REG_DWORD = 0x00010001
L123
L124 ;
L125 ; Localizable Strings
L126 ;
L127
L128 ProviderName = “Brandt”
L129 MfgName = “Brandt”
L130
L131 moufiltr.DeviceDesc = “Usermode-controlled mouse filter”
L132
L133 ; Make sure the service description is unique to avoid collision with another INF.
L134 moufiltr.SvcDesc = “Usermode-controlled mouse filter”
L135
L136 DiskId1 = “Mouse Filter Install Disk”
L137

After changing the DIRIDs to 13, InfVerif /v /w tells me the INF is VALID.

Installation using devmgmt still fails.

Output of setupapi.dev.log:

[Device Install (DiShowUpdateDevice) - HID\VID_062A&PID_5918&MI_01&COL01\7&2A2DEB8A&0&0000]
Section start 2022/03/31 12:22:05.602
cmd: “C:\WINDOWS\system32\mmc.exe” C:\WINDOWS\system32\devmgmt.msc
dvi: {DIF_UPDATEDRIVER_UI} 12:22:05.609
dvi: Default installer: Enter 12:22:05.614
dvi: Default installer: Exit
dvi: {DIF_UPDATEDRIVER_UI - exit(0xe000020e)} 12:22:05.625
ndv: {Update Driver Software Wizard - HID\VID_062A&PID_5918&MI_01&COL01\7&2A2DEB8A&0&0000}
! ndv: Searching Windows Update has been disabled for the Update Wizard.
! ndv: Policy has been set to prevent searching Windows Update for drivers.
dvi: {DIF_SELECTDEVICE} 12:22:08.576
dvi: {DIF_SELECTDEVICE - exit(0xe000020e)} 12:22:08.581
dvi: {DIF_SELECTDEVICE} 12:22:18.898
dvi: {DIF_SELECTDEVICE - exit(0xe000020e)} 12:22:18.905
dvi: {DIF_SELECTDEVICE} 12:29:43.690
dvi: {DIF_SELECTDEVICE - exit(0xe000020e)} 12:29:43.699
dvi: {DIF_SELECTDEVICE} 12:30:34.376
dvi: {DIF_SELECTDEVICE - exit(0xe000020e)} 12:30:34.384
dvi: {DIF_SELECTDEVICE} 13:04:15.001
dvi: {DIF_SELECTDEVICE - exit(0xe000020e)} 13:04:15.007
dvi: {DIF_SELECTDEVICE} 13:10:37.108
dvi: {DIF_SELECTDEVICE - exit(0xe000020e)} 13:10:37.114

the DIRID has nothing to do with the driver package not matching. Better to run from the driver store with a DIRID of 13, but that is a separate statement. Are you sure you are trying to install your driver package on the mouse stack? IOW, did you verify that HID\VID_062A&PID_5918&MI_01&COL01\7&2A2DEB8A&0&0000 has HID_DEVICE_SYSTEM_MOUSE as a compatible ID? Technically speaking, you are matching against a compatible ID and your INF should be (note the extra space and comma between moufilter and the compat id)

%moufiltr.DeviceDesc% = moufiltr, , HID_DEVICE_SYSTEM_MOUSE ; *PNP0FAKE