Hi All,
During driver entry, a firmware file needs to be picked up from:
Windows/System32/drivers/firmware_file.hex
and get downloaded to the device. As a result, during driver installation the file needs to be copied from the installation media to Windows/System32/drivers folder. I am trying how to do this with dpinst.exe.
I thought that I can configure this through inf. Currently my .inf file looks as follows:
[Version]
Signature = “$Windows NT$”
Class = Net
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
Provider = %MYCOMPANY%usb
CatalogFile = myproduct.cat
DriverVer=05/26/2016,10.18.37.599
;DriverVer = 04/20/2011,2.0.0.62
;;;;; Installation Configuration ;;;;;
[SourceDisksNames]
1 = %DiskDescription%,myproduct.sys,
[SourceDisksFiles]
myproduct.sys = 1,
firmware_file.hex = 1,
[DestinationDirs]
my_company.CopyFiles = 12
DefaultDestDirs = 11
CoInstaller_CopyFiles = 11
[DefaultInstall]
;Include=netvwifibus.inf
;Needs=VWiFiBus.CopyFiles
Characteristics = 0x84
BusType = 15
AddReg = my_company.reg
DelReg = my_company.DelReg
CopyFiles = my_company.CopyFiles
*IfType = 71 ; IF_TYPE_IEEE80211
*MediaType = 16 ; NdisMediumNative802_11
*PhysicalMediaType = 9 ; NdisPhysicalMediumNative802_11
[DefaultInstall.Services]
Include=netvwifibus.inf
Needs=VWiFiBus.CopyFiles
AddService = my_company_my_product, 2, my_company.Service, my_company.EventLog
[DefaultInstall.Service]
DisplayName = %my_company.Service.DispName%
ServiceType = 1 ;SERVICE_KERNEL_DRIVER
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary = %12%\myproduct.sys
LoadOrderGroup = NDIS
[my_company.CopyFiles]
myproduct.sys,2
[CoInstaller_CopyFiles]
wdfcoinstaller01005.dll
;;;;; Installation Configuration ;;;;;
[Manufacturer]
%MYCOMPANY% = my_company, NTamd64.6.1
[ControlFlags]
ExcludeFromSelect = *
[my_company.NTamd64.6.1]
;DisplayName Section Hardware ID
;----------- ------- --------------------------
%MYCOMPANY.DeviceDesc% = my_company.ndi, USB\VID_16C1&PID_1CDE
[my_company.ndi.NTamd64]
Include=netvwifibus.inf
Needs=VWiFiBus.CopyFiles
Characteristics = 0x84
BusType = 15
AddReg = my_company.reg
DelReg = my_company.DelReg
CopyFiles = my_company.CopyFiles
*IfType = 71 ; IF_TYPE_IEEE80211
*MediaType = 16 ; NdisMediumNative802_11
*PhysicalMediaType = 9 ; NdisPhysicalMediumNative802_11
[my_company.ndi.NTamd64.Services]
Include=netvwifibus.inf
Needs=VWiFiBus.CopyFiles
AddService = my_company_my_product, 2, my_company.Service, my_company.EventLog
[my_company.ndi.NTamd64.HW]
Include=netvwifibus.inf
Needs=VWiFiBus.PnPFilterRegistration
AddReg = my_company_os61.vwifi.reg
[my_company.reg]
HKR, Ndi, Service, 0, “my_company_my_product”
HKR, Ndi\Interfaces, UpperRange, 0, “ndis5”
HKR, Ndi\Interfaces, LowerRange, 0, “wlan,ethernet,vwifi”
HKR, , forceNormalSlotMrvl, 0x00002, “1”
HKR, , htAdhocEnable, 0x00002, “0”
[my_company.Service]
DisplayName = %my_company.Service.DispName%
ServiceType = 1 ;SERVICE_KERNEL_DRIVER
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary = %12%\myproduct.sys
LoadOrderGroup = NDIS
[my_company.EventLog]
AddReg = my_company.AddEventLog.reg
[my_company.AddEventLog.reg]
HKR, , EventMessageFile, 0x00020000, “%%SystemRoot%%\System32\netevent.dll”
HKR, , TypesSupported, 0x00010001, 7
[myproduct.Dev.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles
[SourceDisksFiles]
wdfcoinstaller01005.dll=1 ; make sure the number matches with SourceDisksNames
[CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “wdfcoinstaller01005.dll,WdfCoInstaller”
[myproduct.Dev.NT.Wdf]
KmdfService = myproduct, myproduct_wdfsect
[myproduct_wdfsect]
KmdfLibraryVersion = 1.5
;; Adds the VWiFi PNP filter
[my_company_os61.vwifi.reg]
HKR,“UpperFilters”,0x00010000,“vwifibus”
[Strings]
Msft = “Microsoft”
MYCOMPANY = “MyCompanyName”
MYCOMPANY.DeviceDesc= “my_company MyProduct”
my_company.Service.DispName = “my_company my_product”
DiskDescription = “myCompany USB”
Any ideas, what is wrong?