Installing a pci (upper) filter driver always reboots (Windows 10)

Hi!

Our custom PC based systems uses an upper filter driver to access memory of a Pericom PCI bridge (serial numbers and such).
The install usually did not trigger a reboot. Some Windows 10 updates ago, reboots after installing started to happen.

The driver comes with an exe helper: dw_bridge_updater.exe. This one has the task to:

  1. Install (Uninstall) the filter driver
  2. Scan for the Pericom PCI bridge
  3. If the bridge is found, add the necessary Upper Filter entry to the registry. Rebuilds driver stack (SetupDiSetClassInstallParams, SetupDiChangeState)

The reboot is triggered during step 1.
This is just a call to:
InstallHinfSectionW(NULL, NULL, “dewe2.inf”, 0);

The reboot happens on all systems now. Also if there is no Pericom bridge.

I attached the necessary information and i hope that someone has a hint for me.

1000 thanks in advance,

Gunther

INF File:

; Copyright DEWETRON GmbH 2019
;
; INF for installing DwEnclosure/DEWE2 filter driver
; 

;
; Identify this .INF file
;
[Version]
Signature = "$Windows NT$"
Class = "SYSTEM"
ClassGuid = {4d36e97d-e325-11ce-bfc1-08002be10318}
Provider = %MFGNAME%
DriverVer = 03/16/2020,5.0.0.54411
CatalogFile = dewe2.cat


;
; Identify the installation media. Note: .x86, .ia64, .amd64, .arm, or .arm64 extension
;
[SourceDisksNames]
1 = %INSTDISK%

;
; Identify the files on the installation media.  Note: .x86, .ia64, .amd64, .arm, or .arm64 extension
;
[SourceDisksFiles.x86]
dewe2.sys = 1,\x86,
dw_bridge_updater.exe = 1,\x86

[SourceDisksFiles.amd64]
dewe2.sys = 1,\x64,
dw_bridge_updater.exe = 1,\x64

;
; Identify where the files will be copied to
;
[DestinationDirs]
DriverFiles = 12
DriverUpdaterFiles = 11

;
; The driver should be copied to 12 = %SystemRoot%\System32\Drivers
;
[DriverFiles]
%DRIVERFILENAME%

;
; The bridge updater should be copied to 11 = %SystemRoot%\System32
;
[DriverUpdaterFiles]
dw_bridge_updater.exe

;
; Install files for x64
;
[DefaultInstall.ntamd64]
CopyFiles = DriverFiles
CopyFiles = DriverUpdaterFiles

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

[DefaultUninstall.ntamd64]
LegacyUninstall=1

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


;
; Install files for x86
;
[DefaultInstall.ntx86]
CopyFiles = DriverFiles
CopyFiles = DriverUpdaterFiles

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

[DefaultUninstall.ntx86]
LegacyUninstall=1

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



;
; Service
;
[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 GmbH"
INSTDISK="DEWE2 driver disk"
DESCRIPTION="DEWETRON enclosure driver"
SERVICENAME="dwencdrv"
DRIVERFILENAME="dewe2.sys"

Setup api dev log

[Boot Session: 2020/03/16 17:11:47.500]

>>>  [Driver Install (DrvSetupInstallDriver) - C:\Development\Mercurial\SW_APP\tmp\build_dir\dewe2\dewe2.inf]
>>>  Section start 2020/03/16 17:13:36.239
      cmd: "C:\Development\Mercurial\SW_APP\driver\bridge_filter\bridge_updater\build64\Debug\dw_bridge_updater.exe" --add --inf-file C:\Development\Mercurial\SW_APP\tmp\build_dir\dewe2\dewe2.inf
     dvs: Flags: 0x00000000.
     dvs: {Driver Setup Import Driver Package: C:\Development\Mercurial\SW_APP\tmp\build_dir\dewe2\dewe2.inf} 17:13:36.239
     dvs:      Driver package already imported as 'oem0.inf'.
     dvs: {Driver Setup Import Driver Package - exit (0x00000000)} 17:13:36.254
     dvi: {Plug and Play Service: Driver Install for C:\WINDOWS\System32\DriverStore\FileRepository\dewe2.inf_amd64_ef9457fe090ec63c\dewe2.inf}
     pol:      {Driver package policy check} 17:13:36.317
     pol:      {Driver package policy check - exit(0x00000000)} 17:13:36.332
     sto:      {Configure Driver Package: C:\WINDOWS\System32\DriverStore\FileRepository\dewe2.inf_amd64_ef9457fe090ec63c\dewe2.inf}
     inf:           Class GUID     = {4d36e97d-e325-11ce-bfc1-08002be10318}
     inf:           Class Options  = Configurable BootCritical
     inf:           {Configure Driver: DefaultInstall.NTamd64}
     inf:                Section Name = DefaultInstall.NTamd64
     inf:                Driver Type  = Primitive
     sto:                Finding all driver package versions
     sto:                     dewe2.inf_amd64_ef9457fe090ec63c [oem0.inf] - 03/16/2020,5.0.0.54411 (Active)
     sto:                Selected driver package 'dewe2.inf_amd64_ef9457fe090ec63c'.
     inf:                {Add Service: dwencdrv}
     inf:                     Start Type    = 3
     inf:                     Service Type  = 1
     inf:                     Error Control = 1
     inf:                     Image Path    = \SystemRoot\System32\drivers\dewe2.sys
     inf:                     Updated service 'dwencdrv'.
     inf:                {Add Service: exit(0x00000000)}
     inf:           {Configure Driver: exit(0x00000000)}
     flq:           Copying 'C:\WINDOWS\System32\DriverStore\FileRepository\dewe2.inf_amd64_ef9457fe090ec63c\x64\dewe2.sys' to 'C:\WINDOWS\System32\drivers\dewe2.sys'.
     flq:           Copying 'C:\WINDOWS\System32\DriverStore\FileRepository\dewe2.inf_amd64_ef9457fe090ec63c\x64\dw_bridge_updater.exe' to 'C:\WINDOWS\System32\dw_bridge_updater.exe'.
     dvi:           Existing files modified, may need to restart related services.
     sto:      {Configure Driver Package: exit(0x00000bc3)}
     dvi:      Restarting all devices in {4d36e97d-e325-11ce-bfc1-08002be10318} class.
     dvi:      {Restarting Devices} 17:13:36.442
     dvi:           Query-remove: PCI\VEN_1022&DEV_43B4&SUBSYS_33061B21&REV_02\5&397162D&0&300209
     dvi:           Query-remove: PCI\VEN_1022&DEV_43B4&SUBSYS_33061B21&REV_02\5&397162D&0&280209
     dvi:           Query-remove: ACPI\AMDIF030\0
     dvi:           Query-remove: PCI\VEN_1022&DEV_145A&SUBSYS_145A1022&REV_00\4&3A3540B1&0&0039
     dvi:           Query-remove: ROOT\VOLMGR\0000
!    dvi:           Query-removal vetoed by 'STORAGE\Volume\{88cde949-140e-11e9-961e-806e6f6e6963}#0000000001100000' (veto type 6: PNP_VetoDevice).
!    dvi:           Device required reboot: Query remove failed : 0x17: CR_REMOVE_VETOED.
     dvi:           Query-remove: PCI\VEN_1022&DEV_1457&SUBSYS_CB091462&REV_00\4&2B9CC193&0&0341
     dvi:           Query-remove: PCI\VEN_1022&DEV_1466&SUBSYS_00000000&REV_00\3&11583659&0&C6

     dvi:           Start: ROOT\RDPBUS\0000
     dvi:           Start: PCI\VEN_1022&DEV_1461&SUBSYS_00000000&REV_00\3&11583659&0&C1
     dvi:           Start: PCI\VEN_1022&DEV_1461&SUBSYS_00000000&REV_00\3&11583659&0&C9
     dvi:           Start: PCI\VEN_1022&DEV_43B4&SUBSYS_33061B21&REV_02\5&397162D&0&180209
     dvi:      {Restarting Devices exit} 17:14:06.448
!    dvi:      Reboot required to restart all devices in class.
     ump: {Plug and Play Service: Driver Install exit(00000000)}
<<<  Section end 2020/03/16 17:14:06.458
<<<  [Exit status: SUCCESS]