Cross Platform/OS INF issues

Do the cross platform and different OS extensions, to be used with Model(s) section name(s) work properly?

I have an INF file using such extensions for XP and Win7/Vista installation. (32 & 64 bit)

During installation, error is seen that ’ Could not find the file specified’. The folder used for installation contains the INF file and Win7 driver .sys file.

When XP driver file is also included in this folder, then the installation proceeds.

This shouldn’t have happened as there are different sections decorated by the applicable extensions.

I found similar issue reported earlier:
http://www.osronline.com/showThread.cfm?link=129794#top

(I wanted to post my query there itself, but as it’s a aged link, posting has been disabled there.)

Anyways, my INF file is mostly the same as the one mentioned at this link.

I also saw the setupapi.dev log file. It was seen that during installation, it required XP and Vista driver sys files.

Is there a solution for this?

Thanks,
Rakesh.

you might want to post your inf file as I can’t really see it from here.

Mark Roddy

On Wed, Aug 11, 2010 at 10:03 AM, wrote:

> Do the cross platform and different OS extensions, to be used with Model(s)
> section name(s) work properly?
>
> I have an INF file using such extensions for XP and Win7/Vista
> installation. (32 & 64 bit)
>
> During installation, error is seen that ’ Could not find the file
> specified’. The folder used for installation contains the INF file and Win7
> driver .sys file.
>
> When XP driver file is also included in this folder, then the installation
> proceeds.
>
> This shouldn’t have happened as there are different sections decorated by
> the applicable extensions.
>
> I found similar issue reported earlier:
> http://www.osronline.com/showThread.cfm?link=129794#top
>
> (I wanted to post my query there itself, but as it’s a aged link, posting
> has been disabled there.)
>
> Anyways, my INF file is mostly the same as the one mentioned at this link.
>
> I also saw the setupapi.dev log file. It was seen that during installation,
> it required XP and Vista driver sys files.
>
> Is there a solution for this?
>
> Thanks,
> Rakesh.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

I am posting the INF file, but I have removed and/or modified certain details from the INF.

==============================================================
;***********************************************************************
;
; Test.inf
;
;***********************************************************************

[Version]
DriverVer =
Signature = “$Windows NT$”
Compatible = 1
Class = Net
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
Provider = %VER_VENDOR_NAME_STR%
CatalogFile =

[ControlFlags]
;Exclude all PNP adapters from user selection
ExcludeFromSelect = *

[Manufacturer]
; We will need to add specific OS version here as well. Our driver will be different for Vista and Win7
%VER_VENDOR_NAME_STR% = my_models, NTx86.6.0, NTx86.5.1, NTia64, NTamd64

[my_models.NTx86.6.0]
%DESC_STR% = install_section.NTx86, (hw-id)

[my_models.NTx86.5.1]
%DESC_STR% = install_section.NTx86.5.1, (hw-id)

[my_models.NTia64]
%DESC_STR% = install_section.NTia64, (hw-id)

[my_models.NTamd64]
%DESC_STR% = install_section.NTamd64, (hw-id)

;********************************************************************************
; x86 Install section for Windows XP
;********************************************************************************
[install_section.NTx86.5.1]
AddReg = install_section.reg
CopyFiles = install_section.copyfiles.NTx86.5.1
BusType = 1
Characteristics = 0x84 ; NCF_PHYSICAL, NCF_HAS_UI

[install_section.NTx86.5.1.Services]
AddService = %SERVICE_STR%, 2, install_section.Service.NTx86.5.1, install_section.EventLog

[install_section.Service.NTx86.5.1]
DisplayName = %SERVICE_STR%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\drv51x86.sys
LoadOrderGroup = NDIS

;********************************************************************************
; x86 Install section for Windows 7
;********************************************************************************
[install_section.NTx86]
AddReg = install_section.reg,
CopyFiles = install_section.copyfiles.NTx86
; BusType is not required in Win7, this is here just to satisfy ChkINF
BusType = 1
Characteristics = 0x84 ; NCF_PHYSICAL, NCF_HAS_UI
*IfType =
*MediaType =
*PhysicalMediaType =

[install_section.NTx86.Services]
AddService = %SERVICE_STR%, 2, install_section.Service.NTx86, install_section.EventLog

[install_section.Service.NTx86]
DisplayName = %SERVICE_STR%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\drv62x86.sys
LoadOrderGroup = NDIS

;********************************************************************************
; IA-64 Install section for Windows 7
;********************************************************************************
[install_section.NTia64]
AddReg = install_section.reg
CopyFiles = install_section.copyfiles.NTia64
; BusType is not required in Win7, this is here just to satisfy ChkINF
BusType = 1
Characteristics = 0x84 ; NCF_PHYSICAL, NCF_HAS_UI
*IfType =
*MediaType =
*PhysicalMediaType =

[install_section.NTia64.Services]
AddService = %SERVICE_STR%, 2, install_section.NTia64.Service, install_section.EventLog

[install_section.NTia64.Service]
DisplayName = %SERVICE_STR%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\drv62ia64.sys
LoadOrderGroup = NDIS

;********************************************************************************
; x64 Install section for Windows 7
;********************************************************************************
[install_section.NTamd64]
AddReg = install_section.reg,
CopyFiles = install_section.copyfiles.NTamd64
; BusType is not required in Win7, this is here just to satisfy ChkINF
BusType = 1
Characteristics = 0x84 ; NCF_PHYSICAL, NCF_HAS_UI
*IfType =
*MediaType =
*PhysicalMediaType =

[install_section.NTamd64.Services]
AddService = %SERVICE_STR%, 2, install_section.NTamd64.Service, install_section.EventLog

[install_section.NTamd64.Service]
DisplayName = %SERVICE_STR%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\drv62x64.sys
LoadOrderGroup = NDIS

;********************************************************************************
; Add Reg Section
;********************************************************************************
[install_section.reg]

;*********************************************************************************************
[install_section.EventLog]
AddReg = install_section.EventLog.reg

[install_section.EventLog.reg]

;*********************************************************************************************
[DestinationDirs]
DefaultDestDir = 12 ; %windir%\system32\drivers

[SourceDisksNames]
1 = %INSTALL_DISK_STR%

[SourceDisksFiles]
drv62x86.sys = 1
drv51x86.sys = 1
drv62x64.sys = 1
drv62ia64.sys = 1
OtherDRV.sys = 1

[install_section.copyfiles.NTx86]
drv62x86.sys
OtherDRV.sys

[install_section.copyfiles.NTx86.5.1]
drv51x86.sys
OtherDRV.sys

[install_section.copyfiles.NTamd64]
drv62x64.sys
OtherDRV.sys

[install_section.copyfiles.NTia64]
drv62ia64.sys
OtherDRV.sys

;*********************************************************************************************
[Strings]

================================================================

-Rakesh

> %VER_VENDOR_NAME_STR% = my_models, NTx86.6.0, NTx86.5.1, NTia64, NTamd64

  • AFAIK, Win7 is 6.1, not 6.0 (therefore XP version is used)

  • Does your driver really need to be different for XP / Vista / Win7?
    (We here can do with one driver binary for all OS versions.)

Also check setupapi*.log files (post excerpts) for what actually is
installed on Win7.

From DDK documentation on INF Manufacturer section:


Setup's selection of which Models section to use is based on the following rules:

-If the INF contains INF Models sections for several major or minor operating system version numbers, Setup uses the section with the highest version numbers that are not higher than the operating system version on which the installation is taking place.
-If the INF Models sections that match the operating system version also include product type and/or product suite decorations, Setup selects the section that most closely matches the running OS.

So, the extension specified need not be exact, since the closest is chosen. In my case, 6.0 is used as same driver is targeted for Vista and Win7. But different for XP.

Also, I am posting the setupapi.dev log (with some changes in names):

>> [Device Install (DiShowUpdateDevice) - (hwid)]
>> Section start 2010/08/11 18:34:58.360
cmd: "C:\Windows\system32\mmc.exe" "C:\Windows\system32\devmgmt.msc"
dvi: {DIF_UPDATEDRIVER_UI} 18:34:58.360
dvi: Using exported function 'NetClassInstaller' in module 'C:\Windows\system32\NetCfgx.dll'.
dvi: Class installer == NetCfgx.dll,NetClassInstaller
dvi: Using exported function 'NciDeviceInstall' in module 'C:\Windows\system32\nci.dll'.
dvi: CoInstaller 1 == nci.dll,NciDeviceInstall
dvi: Using exported function 'WlanDeviceClassCoInstaller' in module 'C:\Windows\system32\wlaninst.dll'.
dvi: CoInstaller 2 == wlaninst.dll,WlanDeviceClassCoInstaller
dvi: Using exported function 'WwanDeviceClassCoInstaller' in module 'C:\Windows\system32\wwaninst.dll'.
dvi: CoInstaller 3 == wwaninst.dll,WwanDeviceClassCoInstaller
dvi: CoInstaller 1: Enter 18:34:58.376
dvi: CoInstaller 1: Exit
dvi: CoInstaller 2: Enter 18:34:58.376
dvi: CoInstaller 2: Exit
dvi: CoInstaller 3: Enter 18:34:58.376
dvi: CoInstaller 3: Exit
dvi: Class installer: Enter 18:34:58.376
dvi: Class installer: Exit
dvi: Default installer: Enter 18:34:58.376
dvi: Default installer: Exit
dvi: {DIF_UPDATEDRIVER_UI - exit(0xe000020e)} 18:34:58.376
ndv: {Update Driver Software Wizard for (hwid)}
inf: Opened INF: 'c:\mydriver\test.inf' ([strings])
inf: {SetupCopyOEMInf: c:\mydriver\test.inf} 18:35:03.321
sto: {Import Driver Package: c:\mydriver\test.inf} 18:35:03.336
sto: Importing driver package into Driver Store:
sto: Driver Store = C:\Windows\System32\DriverStore (Online | 6.1.7600)
sto: Driver Package = c:\mydriver\test.inf
sto: Architecture = x86
sto: Locale Name = neutral
sto: Flags = 0x00000000
sto: Copying driver package files to 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}'.
inf: Opened INF: 'c:\mydriver\test.inf' ([strings])
! inf: DriverVer directive specifies invalid version "...". Section = [Version], Line = 1
inf: Opened INF: 'c:\mydriver\test.inf' ([strings])
! inf: DriverVer directive specifies invalid version "...". Section = [Version], Line = 1
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - 'c:\mydriver'
flq: SourceFilename - 'test.inf'
flq: TargetDirectory- 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}'
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - 'c:\mydriver'
flq: SourceFilename - 'drv51x86.sys'
flq: TargetDirectory- 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}'
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - 'c:\mydriver'
flq: SourceFilename - 'drv62x86.sys'
flq: TargetDirectory- 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}'
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - 'c:\mydriver'
flq: SourceFilename - 'OtherDRV.sys'
flq: TargetDirectory- 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}'
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {_commit_file_queue}
flq: CommitQ DelNodes=0 RenNodes=0 CopyNodes=4
flq: {_commit_copy_subqueue}
flq: subqueue count=4
flq: source media:
flq: SourcePath - [c:\mydriver]
flq: SourceFile - [test.inf]
flq: Flags - 0x00000000
flq: {_commit_copyfile}
flq: CopyFile: 'c:\mydriver\test.inf'
flq: to: 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\SET706F.tmp'
flq: MoveFile: 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\SET706F.tmp'
flq: to: 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\Test.inf'
flq: {_commit_copyfile exit OK}
flq: {_commit_copyfile}
flq: CopyFile: 'c:\mydriver\drv62x86.sys'
flq: to: 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\SET7080.tmp'
flq: MoveFile: 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\SET7080.tmp'
flq: to: 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\drv62x86.sys'
flq: {_commit_copyfile exit OK}
flq: {_commit_copyfile}
flq: CopyFile: 'c:\mydriver\OtherDRV.sys'
flq: to: 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\SET70AF.tmp'
flq: MoveFile: 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\SET70AF.tmp'
flq: to: 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\OtherDRV.sys'
flq: {_commit_copyfile exit OK}
flq: source media:
flq: SourcePath - [c:\mydriver]
flq: SourceFile - [drv51x86.sys]
flq: Flags - 0x00000000
flq: {_commit_copyfile}
!!! flq: Error installing file (0x00000002)
!!! flq: Error 2: The system cannot find the file specified.
! flq: SourceFile - 'c:\mydriver\drv51x86.sys'
! flq: TargetFile - 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\drv51x86.sys'
flq: {SPFQNOTIFY_COPYERROR}
!!! sto: Failed to copy file 'c:\mydriver\drv51x86.sys' to 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}\drv51x86.sys'. Error = 0x00000002
flq: {SPFQNOTIFY_COPYERROR - returned 0x00000000}
!!! flq: SPFQNOTIFY_COPYERROR: returned SPFQOPERATION_ABORT.
!!! flq: Error 995: The I/O operation has been aborted because of either a thread exit or an application request.
flq: {_commit_copyfile exit(0x000003e3)}
flq: {_commit_copy_subqueue exit(0x000003e3)}
!!! flq: FileQueueCommit aborting!
!!! flq: Error 995: The I/O operation has been aborted because of either a thread exit or an application request.
flq: {_commit_file_queue exit(0x000003e3)}
!!! sto: Failed to copy driver package to 'C:\Users\Vendor\AppData\Local\Temp{6ccb8ebb-d9a2-6ee8-4b2b-f072d60e8844}'. Error = 0x00000002
sto: {Import Driver Package: exit(0x00000002)} 18:35:03.508
inf: Opened INF: 'c:\mydriver\Test.inf' ([strings])
! inf: Add to Driver Store unsuccessful
! inf: Error 2: The system cannot find the file specified.
!!! inf: returning failure to SetupCopyOEMInf
inf: {SetupCopyOEMInf exit (0x00000002)} 18:35:03.648
ndv: {Update Driver Software Wizard exit(00000002)}
<<< Section end 2010/08/11 18:35:06.597
<<< [Exit status: FAILURE(0x00000002)]
================================================================

[DDK documentation on INF Manufacturer section quote]

Fine. But please consider that *our* INF file works, and yours does not.

I’d humbly suggest to try these changes:

DriverVer = 08/11/2010, 1.0.0.0
(get rid of ERROR message in setupapi log)

; CatalogFile =
(don’t specify it, if you don’t have one)

[my_models.NTx86.6.0]
%DESC_STR% = install_section.NTx86.6.0, (hw-id)
(note the added qualifier for Vista+ ^)

[install_section.NTx86.6.0]
(note the added qualifier for Vista+)

[install_section.NTx86.6.0.Services]
(note the added qualifier for Vista+)

[install_section.Service.NTx86.6.0]
(note the added qualifier for Vista+)

[install_section.copyfiles.NTx86.6.0]
(note the added qualifier for Vista+)

I have already tried that change, of using added qualifier for Vista. It wasn’t working.