I created a new Visual Studio 2022 KMDF driver project changing only the INF file.
I cannot get passed the "Installation Failed" error message with no entries in the setupapi.dev.log file.
I am pretty confident that my INF file is fine. I perused the learning site on Microsoft's website and found the verycrypt filter driver sample on github. That matches almost identically to what I created and what the Microsoft document states that it wants, just I am using a lower-level Disk Drive driver, not an upper-level encryption driver. For good measure, I took the veracrypt inf file changing just the names and I still got the "Installation Failed". Lastly, I ran the inf file through the chkinf.bat utility. Here are the findings, basically nothing.
Line 15: (W22.1.2202) Unrecognized directive: PnpLockdown
Line 35: (W22.1.2083) Section [DEFAULTINSTALL.NTARM64] not referenced
Line 46: (W22.1.2083) Section [DEFAULTINSTALL.NTARM64.SERVICES] not referenced
Line 80: (W22.1.2213) INF files should not set registry entries under 'HKLM,System\CurrentControlSet\Control\Class'.
Notes:
- I used the release build
- Signed the driver using a DigiCert EV Code Signing Certificate
- Started my Win10 VM from scratch, no hold over from a previous install attempt
All the above tells me that I need to do something with the default code. I tried forcefully returning a STATUS_SUCCESS in the off chance that the DriverEntry failed, but no luck.
[Version]
signature = "$Windows NT$"
Class = DiskDrive
ClassGuid = {4D36E967-E325-11CE-BFC1-08002BE10318}; {4D36E967-E325-11CE-BFC1-08002BE10318} is "LowerFilters", which matches the VS10 code
Provider = %ProviderString%
DriverVer = 02/03/2025,1.26.20.0
CatalogFile = icsflt.cat
PnpLockdown = 1
[DestinationDirs]
DefaultDestDir = 12
icsflt.DriverFiles = 12 ;%windir%\system32\drivers
;;
;; Default install sections
;;
[DefaultInstall.NTx86]
OptionDesc = %ServiceDescription%
CopyFiles = icsflt.DriverFiles
AddReg = icsflt.AddReg
[DefaultInstall.NTamd64]
OptionDesc = %ServiceDescription%
CopyFiles = icsflt.DriverFiles
AddReg = icsflt.AddReg
[DefaultInstall.NTarm64]
OptionDesc = %ServiceDescription%
CopyFiles = icsflt.DriverFiles
AddReg = icsflt.AddReg
[DefaultInstall.NTx86.Services]
AddService = icsflt,,icsflt.Service
[DefaultInstall.NTamd64.Services]
AddService = icsflt,,icsflt.Service
[DefaultInstall.NTarm64.Services]
AddService = icsflt,,icsflt.Service
;
; Services Section
;
[icsflt.Service]
DisplayName = %ServiceDescription%
Description = %ServiceDescription%
ServiceBinary = %12%\icsflt.sys ;%windir%\system32\drivers\
ServiceType = 2 ;SERVICE_FILE_SYSTEM_DRIVER
StartType = 0 ;SERVICE_BOOT_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
LoadOrderGroup = "Filter"
;
; Copy Files
;
[icsflt.DriverFiles]
icsflt.sys
[SourceDisksFiles]
icsflt.sys = 1,,
[SourceDisksNames]
1 = %DiskId1%,,,
;
; Registry Entries
;
[icsflt.AddReg]
HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}, LowerFilters, 0x00010008, icsflt
;HKLM, System\CurrentControlSet\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318}, LowerFilters, 0x00010008, PartMgr
;;
;; String Section
;;
[Strings]
ProviderString = "icsflt company name"
ServiceDescription = "icsflt"
DiskId1 = "icsflt Device Installation Disk"