Missing SourceDiskFiles/ SourceDiskNames in INF file

Hi All,

I am trying to write protocol driver INF file for cross platform and multi (2003 and 2008) Windows OS.

I am getting Setupapi.app log like this:

[SetupInstallFilesFromInfSection - MVlanP.NTx86.6.0]

>> Section start 2009/06/18 20:45:38.073
cmd: C:\Windows\Explorer.EXE
inf: copyfiles=MVlanP.CopyFiles.DLL,MVlanP.CopyFiles.sys (mvlanpt.inf line 65)
flq: QueueSingleCopy…
flq: Inf : ‘c:\users\administrator\desktop\vlan_totos\mvlanpt.inf’
! flq: Missing SourceDisksFiles/SourceDisksNames information from INF.
flq: Source root path based on Main INF
flq: SourceRootPath: ‘c:\users\administrator\desktop\vlan_totos’
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000400
flq: SourceRootPath - ‘c:\users\administrator\desktop\vlan_totos’
flq: SourceFilename - ‘MVlan.dll’
flq: TargetDirectory- ‘C:\Windows\system32’
flq: TargetFilename - ‘MVlan.dll’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: QueueSingleCopy…
flq: Inf : ‘c:\users\administrator\desktop\vlan_totos\mvlanpt.inf’
! flq: Missing SourceDisksFiles/SourceDisksNames information from INF.
flq: Source root path based on Main INF
flq: SourceRootPath: ‘c:\users\administrator\desktop\vlan_totos’
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000400
flq: SourceRootPath - ‘c:\users\administrator\desktop\vlan_totos’
flq: SourceFilename - ‘MVlan.sys’
flq: TargetDirectory- ‘C:\Windows\system32\DRIVERS’
flq: TargetFilename - ‘MVlan.sys’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
<<< Section end 2009/06/18 20:45:38.089
<<< [Exit status: SUCCESS]


INF file missing to copy sys file and DLL file.

INF File particular sections:

[MVlanP.NTx86.6.0] ; For 2008 OS
AddReg = MVlanP.ndi.AddReg
Characteristics = 0x80 ; NCF_HAS_UI
copyfiles = MVlanP.CopyFiles.DLL, MVlanP.CopyFiles.sys
CopyInf = MVlanMP.inf

[SourceDisksNames.NTx86.6.0]
1=%DiskDescription%,\W2K8\x86

[SourceDisksFiles.NTx86.6.0]
MVlan.sys = 1
MVlan.dll = 1

[MVlanP.CopyFiles.Sys]
MVlan.sys,2

[MVlanP.CopyFiles.DLL]
MVlan.dll,2

Any one can please help me where i am missing.

Thanks in Advance,
Suresh.S

xxxxx@gmail.com wrote:

I am trying to write protocol driver INF file for cross platform and multi (2003 and 2008) Windows OS.

I am getting Setupapi.app log like this:

[SetupInstallFilesFromInfSection - MVlanP.NTx86.6.0]

flq: Inf : ‘c:\users\administrator\desktop\vlan_totos\mvlanpt.inf’
! flq: Missing SourceDisksFiles/SourceDisksNames information from INF.

INF file missing to copy sys file and DLL file.

INF File particular sections:

[MVlanP.NTx86.6.0] ; For 2008 OS
AddReg = MVlanP.ndi.AddReg
Characteristics = 0x80 ; NCF_HAS_UI
copyfiles = MVlanP.CopyFiles.DLL, MVlanP.CopyFiles.sys
CopyInf = MVlanMP.inf

[SourceDisksNames.NTx86.6.0]
1=%DiskDescription%,\W2K8\x86

[SourceDisksFiles.NTx86.6.0]
MVlan.sys = 1
MVlan.dll = 1

This is because you didn’t read the documentation. The SourceDisks
sections, for reasons that have been lost in the mists of antiquity, use
a different decoration scheme then all of the other INF sections. You
need to say:

[SourceDisksNames.x86]
1=%DiskDescriptionz%,\W2K8\x86

[SourceDisksFiles.x86]
MVlan.sys = 1
MVlan.dll = 1


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi Tim Roberts,

Thank you very much for your support.

Now it is copying file but i need to copy SYS and DLL files for both 2003 and 2008 in different location.
At the time 2008 OS installation it is taking always 2003 folder SYS and DLL files.
how to differentiate 2003 and 2008 [SourceDisksNames] for 2003 [SourceDisksNames.x86] and 2008 [SourceDisksNames.???].

Is there any other way to differentiate please help me.

Here with i added entire INF File:

[Version]
Signature = “$Windows NT$”
Class = NetTrans
ClassGUID = {4D36E975-E325-11CE-BFC1-08002BE10318}
Provider = %mux%
DriverVer = 05/25/2009,1.0.0.5

;Manufacturer section:

[Manufacturer]
%mux% = mux,NTx86,NTx86.6.0,NTamd64,NTamd64.6.0

;For XP and later

[mux.NTx86]
%MVlanP_Desc% = MVlanP.NTx86, mux_mvlanp

[mux.NTx86.6.0]
%MVlanP_Desc% = MVlanP.NTx86.6.0, mux_mvlanp

[mux.NTamd64]
%MVlanP_Desc% = MVlanP.NTamd64, mux_mvlanp

[mux.NTamd64.6.0]
%MVlanP_Desc% = MVlanP.NTamd64.6.0, mux_mvlanp

; Note:
; 1. The NCF_* flags are defined in netcfgx.h
; 2. NCF_HAS_UI (0x80) is required for custom property pages.
;

;Copying files and adding registry for NTx86
;-------------------------------------------------------------------

[MVlanP.NTx86]
AddReg = MVlanP.ndi.AddReg
Characteristics = 0x80 ; NCF_HAS_UI
copyfiles = MVlanP.CopyFiles.DLL, MVlanP.CopyFiles.sys
CopyInf = MVlanMP.inf

[SourceDisksNames.x86]
1 = %DiskDescription%,\W2k3\x86

[SourceDisksFiles.x86]
MVlan.sys = 1
MVlan.dll = 1

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

;Copying files and adding registry for NTx86.6.0
;--------------------------------------------------------------------

[MVlanP.NTx86.6.0]
AddReg = MVlanP.ndi.AddReg
Characteristics = 0x80 ; NCF_HAS_UI
copyfiles = MVlanP.CopyFiles.DLL, MVlanP.CopyFiles.sys
CopyInf = MVlanMP.inf

[SourceDisksNames.x86.6.0]
1= %DiskDescription%,\W2K8\x86

[SourceDisksFiles.x86.6.0]
MVlan.sys = 1
MVlan.dll = 1

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

;Copying files and adding registry for NTamd64
;---------------------------------------------------------------------

[MVlanP.NTamd64]
AddReg = MVlanP.ndi.AddReg
Characteristics = 0x80 ; NCF_HAS_UI
copyfiles = MVlanP.CopyFiles.DLL, MVlanP.CopyFiles.sys
CopyInf = MVlanMP.inf

[SourceDisksNames.amd64]
1=%DiskDescription%,\W2K3\x64

[SourceDisksFiles.amd64]
MVlan.sys = 1
MVlan.dll = 1

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

;Copying files and adding registry for NTamd64.6.0
;--------------------------------------------------------------------

[MVlanP.NTamd64.6.0]
AddReg = MVlanP.ndi.AddReg
Characteristics = 0x80 ; NCF_HAS_UI
copyfiles = MVlanP.CopyFiles.DLL, MVlanP.CopyFiles.sys
CopyInf = MVlanMP.inf

[SourceDisksNames.amd64.6.0]
1= %DiskDescription%,\W2K8\x64

[SourceDisksFiles.amd64.6.0]
MVlan.sys = 1
MVlan.dll = 1

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

[DestinationDirs]
DefaultDestDir = 12
MVlanP.CopyFiles.DLL = 11 ; %windir%\System32
MVlanP.CopyFiles.Sys = 12 ; %windir%\System32\drivers

[MVlanP.CopyFiles.Sys]
MVlan.sys,2

[MVlanP.CopyFiles.DLL]
MVlan.dll,2

;---------------------------------------------------------------------
; Install parameters
;---------------------------------------------------------------------

;Install parameters for all platforms
;---------------------------------------------------------------------

[MVlanP.ndi.AddReg]
HKR, Ndi, ClsID, 0, {96802279-34a5-4d62-9545-2757f7f4e4e7}
HKR, Ndi, ComponentDll, , MVlan.dll
HKR, Ndi, HelpText, 0, “%MVlanP_HELP%”
HKR, Ndi, Service, 0, “mvlanp”
HKR, Ndi\Interfaces, UpperRange, 0, “noupper”
HKR, Ndi\Interfaces, LowerRange, 0, “ndis5”

[MVlanP.ndi.Services]
AddService = MVlanP, , MVlanP.AddService, MVlanP.AddEventLog

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

[MVlanP.AddService]
DisplayName = %MVlanP_Desc%
ServiceType = 1 ;SERVICE_KERNEL_DRIVER
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary = %12%\MVlan.sys
Description = %MVlanP_Desc%

[MVlanP.AddEventLog]
AddReg = MVlanP.AddEventLog.AddReg

[MVlanP.AddEventLog.AddReg]
HKR, , EventMessageFile, 0x20000, “%%SystemRoot%%\System32\netevent.dll”
HKR, , TypesSupported, 0x10001, 7

;-----------------------------------------------------------------------
; Removing services
;-----------------------------------------------------------------------

;Removing services and files for all platform
;-----------------------------------------------------------------------

[MVlanP.ndi.Remove.Services]
DelService = MVlanP

[MVlanP.ndi.Remove]
DelFiles = MVlanP.CopyFiles.DLL, MVlanP.CopyFiles.sys


once again Thanks Roberts,
Suresh.S

Multi-platform INF techniques are a bit of a confusing mess.

To accomplish what you are trying to do (which I believe is to have a set of
files for each OS version and CPU in one INF) you need to look at using
different CopyFiles sections.

A section entry specified in a CopyFiles directive has a syntax of:

[file-list-section]
destination-file-name[,source-file-name][,temporary-file-name][,flag]

What you want to do is to use the second parameter to good advantage.

[Foo_CopyFiles_2K3]
foo.sys,2k3\foo.sys,

this allows you to specify where (relative to the source folder) to get a
specific file. Since you can have different sections named anything you
want you can control which files get copied.

As a general bit of advice I recommend against this way of packaging a
driver that has different binaries for each platform (and CPU for that
matter). You will drive yourself bonkers building this INF plus if you
have to fix one driver and resign it, you need to resign the entire package
since the .CAT covers the .INF.

You might consider using a technique that places each platform into separate
INFs that use version tags to prevent it from being installed on anything
other than the correct platform/cpu combination.

Good Luck,
Dave Cattley