WDK10 stampinf returns error 1420: [DefaultInstall]-based INF cannot be processed as Primitive.

Hi I am currently in the process of updateiong an older filter driver from WDK7 to WDK10.
Using the “bleeding egde” toolchain VS2019 + latest WDK10.

One of my problems is that stampinf is called automatically and exits with an error:

error1420: [DefaultInstall]-based INF cannot be processed as Primitive.

Calling stampinf from a command prompt returns the same message as warning:

infverif.exe dwencdrv.inf
WARNING(1420) in dwencdrv.inf, line 0: [DefaultInstall]-based INF cannot be processed as Primitive.

I hope somebody is able to help.

Best regards,
Gunther

The problematic inf file:

; -----------------------------------------------------------------------
; INF for installing the DwEnclosure/DEWE2 filter driver
; -----------------------------------------------------------------------

[Version]
Signature="$Windows NT$"
Class="SYSTEM"
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
Provider=%MFGNAME%
DriverVer=
CatalogFile=dwencdrv.cat

; -----------------------------------------------------------------------

[DestinationDirs]
DefaultDestDir=12
DriverCopyFiles=12

[SourceDisksNames]
1=%INSTDISK%

[SourceDisksFiles]

;------------------------------------------------------------------------------
[DefaultInstall.NTAMD64]

[DefaultInstall.NTAMD64.services]
AddService=%SERVICENAME%,,FilterService

;------------------------------------------------------------------------------
[DefaultUninstall.NTAMD64]

[DefaultUninstall.NTAMD64.services]
DelService=%SERVICENAME%,0x00000200 ;Stop service before deleting it

;------------------------------------------------------------------------------
[DefaultInstall.NTX86]

[DefaultInstall.NTX86.services]
AddService=%SERVICENAME%,,FilterService

;------------------------------------------------------------------------------
[DefaultUninstall.NTX86]

[DefaultUninstall.NTX86.services]
DelService=%SERVICENAME%,0x00000200 ;Stop service before deleting it

;------------------------------------------------------------------------------
[FilterService]
ServiceType=1   ;Kernel driver
StartType=3     ;OnDemand start. No reboot required!
;StartType=0    ;OnBoot start. Requires reboot.
ErrorControl=1  ;Normal
ServiceBinary=%12%\%DRIVERFILENAME%

;------------------------------------------------------------------------------
;  String Definitions
;------------------------------------------------------------------------------

[Strings]
MFGNAME = "DEWETRON"
INSTDISK="DwEnclosure driver disk"
DESCRIPTION="DEWETRON enclosure driver"
SERVICENAME="dwencdrv"
DRIVERFILENAME="dwencdrv.sys"

Unbelievable but 5 minutes after asking this question, I stumbled over the answer myself.

This is new behaviour introduced with Windows 10 version 1903 and later:
Look here: https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/creating-a-primitive-driver

To fix this error the DefaultUninstall sections has to be either removed or altered to allow legacy compatibility:

[DefaultUninstall.NTAMD64]
LegacyUninstall=1

[DefaultUninstall.NTX86]
LegacyUninstall=1

Please keep in mind that the uninstall behaviour changes with 1903 and later. You may have also change your msi/setup driver installer.

Bye Gunther

Thanks for posting this… I ran into this problem just yesterday when my driver got built using the new tools.

Note there are new errors that demand the DefaultInstall section be “decorated” with the architecture, as well. Ugh.

Peter

My pleasure,

Gunther