Problem with SetupCopyOEMInf...

Hello Gurus,

I am writing an installer which installs a network device and IM driver. It
works in every scenario except for when I do not have NIC on the target
system.

Basically, the DriverPackageInstall call to install the NIC returns
0xE000020B (ERROR_NO_SUCH_DEVINST), which is expected. But after that when I
am doing SetupCopyOEMInf before installing the IM driver, the
SetupCopyOEMInf returns
0xE0000243(ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED).

If the NIC is present on the system or I install the IM driver individually,
the call goes through fine and I am able to install IM driver using INetCfg
interface.

I have tried to spawn two threads (just to experiment, sequential though) to
install NIC and the IM driver, they succeed.

This behavior is seen on all the variants of Windows server 2K3 and 2K8.

Question:

  1. Is this a known behavior?
  2. If yes, how to get around it? Any pointers, documentation …
  3. How does the call sequence of SetupCopyOEMInf and DriverPackageInstall
    affect each other? I suppose they should not.

Regards,
Chakri

P.S.: I hope I am posting this to right forum. Sincere apologies, if not.

Are these signed driver packages? If so, signed ‘how’? The
0xE0000243(ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED) would seem to suggest
that the CAT is signed with a certificate but that the certificate is not
installed in the machine Trusted Publishers store.

I suggest you turn on verbose (detailed) SETUPAPI logging and compare the
output generated when your install runs in the success case vs. the failure
case.

When you say that the “call goes through fine” (in the success case) are you
saying that the call to SetupCopyOEMInf() for the IM driver NetService class
INF goes through fine or some other call?

By what means is the upper (virtual miniport) Net class INF installed? Are
you pre-installing it with SetupCopyOEMInf() separately (and before the
NetService INF) or using a CopyINF directive?

Are the INFs for the NIC and the INFs for the IM driver ‘related’ in some
way? Do they reference one another?

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Chakri
Sent: Monday, June 14, 2010 6:09 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Problem with SetupCopyOEMInf…

Hello Gurus,

I am writing an installer which installs a network device and IM driver. It
works in every scenario except for when I do not have NIC on the target
system.

Basically, the DriverPackageInstall call to install the NIC returns
0xE000020B (ERROR_NO_SUCH_DEVINST), which is expected. But after that when I

am doing SetupCopyOEMInf before installing the IM driver, the
SetupCopyOEMInf returns
0xE0000243(ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED).

If the NIC is present on the system or I install the IM driver individually,

the call goes through fine and I am able to install IM driver using INetCfg
interface.

I have tried to spawn two threads (just to experiment, sequential though) to

install NIC and the IM driver, they succeed.

This behavior is seen on all the variants of Windows server 2K3 and 2K8.

Question:

  1. Is this a known behavior?
  2. If yes, how to get around it? Any pointers, documentation …
  3. How does the call sequence of SetupCopyOEMInf and DriverPackageInstall
    affect each other? I suppose they should not.

Regards,
Chakri

P.S.: I hope I am posting this to right forum. Sincere apologies, if not.


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

Thanks for quick response.

My replies inline …

Regards,
Chakri

“David R. Cattley” wrote in message news:xxxxx@ntdev…
> Are these signed driver packages? If so, signed ‘how’? The
> 0xE0000243(ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED) would seem to suggest
> that the CAT is signed with a certificate but that the certificate is not
> installed in the machine Trusted Publishers store.
[Chakri] They are authenticode signed. In both the cases, I didn’t install
the certificate on the machine.

>
> I suggest you turn on verbose (detailed) SETUPAPI logging and compare the
> output generated when your install runs in the success case vs. the
> failure
> case.
[Chakri] I did this. The difference is:
Failure : An unsigned, incorrectly signed or Authenticode™ signed
file “c:\chakri\test\net\myim.cat” blocked (server install).
Error:0xE0000242 …
Success: An unsigned, incorrectly signed or Authenticode™ signed file
“c:\chakri\test\net\myim.cat” will be installed (policy=ignore).
Error:0xE0000242 …

I must apologize for typo in the error code, it is 0xE0000242 instead of
0xE0000242.

>
> When you say that the “call goes through fine” (in the success case) are
> you
> saying that the call to SetupCopyOEMInf() for the IM driver NetService
> class
> INF goes through fine or some other call?
>
[Chakri] I meant SetupCopyOEMInf succeeds.

> By what means is the upper (virtual miniport) Net class INF installed?
> Are
> you pre-installing it with SetupCopyOEMInf() separately (and before the
> NetService INF) or using a CopyINF directive?
>
[Chakri] I use SetupCopyOEMInf to preinstall the intermediate driver and
then invoke INetCfg APIs to install the IM driver.

> Are the INFs for the NIC and the INFs for the IM driver ‘related’ in some
> way? Do they reference one another?
[Chakri] No, they do not reference each other. Both have different inf and
cat files.

>
> Good Luck,
> Dave Cattley
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Chakri
> Sent: Monday, June 14, 2010 6:09 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Problem with SetupCopyOEMInf…
>
> Hello Gurus,
>
> I am writing an installer which installs a network device and IM driver.
> It
> works in every scenario except for when I do not have NIC on the target
> system.
>
> Basically, the DriverPackageInstall call to install the NIC returns
> 0xE000020B (ERROR_NO_SUCH_DEVINST), which is expected. But after that when
> I
>
> am doing SetupCopyOEMInf before installing the IM driver, the
> SetupCopyOEMInf returns
> 0xE0000243(ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED).
>
> If the NIC is present on the system or I install the IM driver
> individually,
>
> the call goes through fine and I am able to install IM driver using
> INetCfg
> interface.
>
> I have tried to spawn two threads (just to experiment, sequential though)
> to
>
> install NIC and the IM driver, they succeed.
>
> This behavior is seen on all the variants of Windows server 2K3 and 2K8.
>
> Question:
> 1. Is this a known behavior?
> 2. If yes, how to get around it? Any pointers, documentation …
> 3. How does the call sequence of SetupCopyOEMInf and DriverPackageInstall
> affect each other? I suppose they should not.
>
> Regards,
> Chakri
>
> P.S.: I hope I am posting this to right forum. Sincere apologies, if not.
>
>
> —
> 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
>
>

Hi,

I think that what you have are 2 scenarios: hardware first installations and software first installation. The software first fails because your driver is not WHQL signed. For more information, look at the documentation inside the “Device and Driver Installation” tree, “Device and Driver Installation Fundamental Topics”/“Driver Signing”/“Signing Drivers for Public Release” more specifically.

Regards,
Calin

----- Original Message ----
From: Chakri
To: Windows System Software Devs Interest List
Sent: Mon, June 14, 2010 12:09:01 PM
Subject: [ntdev] Problem with SetupCopyOEMInf…

Hello Gurus,

I am writing an installer which installs a network device and IM driver. It works in every scenario except for when I do not have NIC on the target system.

Basically, the DriverPackageInstall call to install the NIC returns 0xE000020B (ERROR_NO_SUCH_DEVINST), which is expected. But after that when I am doing SetupCopyOEMInf before installing the IM driver, the SetupCopyOEMInf returns 0xE0000243(ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED).

If the NIC is present on the system or I install the IM driver individually, the call goes through fine and I am able to install IM driver using INetCfg interface.

I have tried to spawn two threads (just to experiment, sequential though) to install NIC and the IM driver, they succeed.

This behavior is seen on all the variants of Windows server 2K3 and 2K8.

Question:
1. Is this a known behavior?
2. If yes, how to get around it? Any pointers, documentation …
3. How does the call sequence of SetupCopyOEMInf and DriverPackageInstall affect each other? I suppose they should not.

Regards,
Chakri

P.S.: I hope I am posting this to right forum. Sincere apologies, if not.


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

Hello Calin,
Thanks for pointing out the documentation. I have modified the installer to
install the IM driver(this is a teaming driver) first then install the
network driver and I do not see this problem.

My intention in posting this query was to understand if the
DriverPackageInstall and SetupCopyOEMInf are related in anyway in terms of
order of invoking them.

Regards,
Chakri

“Calin Iaru” wrote in message news:xxxxx@ntdev…
> Hi,
>
> I think that what you have are 2 scenarios: hardware first installations
> and software first installation. The software first fails because your
> driver is not WHQL signed. For more information, look at the documentation
> inside the “Device and Driver Installation” tree, “Device and Driver
> Installation Fundamental Topics”/“Driver Signing”/“Signing Drivers for
> Public Release” more specifically.
>
> Regards,
> Calin
>
>
>
> ----- Original Message ----
> From: Chakri
> To: Windows System Software Devs Interest List
> Sent: Mon, June 14, 2010 12:09:01 PM
> Subject: [ntdev] Problem with SetupCopyOEMInf…
>
> Hello Gurus,
>
> I am writing an installer which installs a network device and IM driver.
> It works in every scenario except for when I do not have NIC on the target
> system.
>
> Basically, the DriverPackageInstall call to install the NIC returns
> 0xE000020B (ERROR_NO_SUCH_DEVINST), which is expected. But after that when
> I am doing SetupCopyOEMInf before installing the IM driver, the
> SetupCopyOEMInf returns
> 0xE0000243(ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED).
>
> If the NIC is present on the system or I install the IM driver
> individually, the call goes through fine and I am able to install IM
> driver using INetCfg interface.
>
> I have tried to spawn two threads (just to experiment, sequential though)
> to install NIC and the IM driver, they succeed.
>
> This behavior is seen on all the variants of Windows server 2K3 and 2K8.
>
> Question:
> 1. Is this a known behavior?
> 2. If yes, how to get around it? Any pointers, documentation …
> 3. How does the call sequence of SetupCopyOEMInf and DriverPackageInstall
> affect each other? I suppose they should not.
>
> Regards,
> Chakri
>
> P.S.: I hope I am posting this to right forum. Sincere apologies, if not.
>
> —
> 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
>
>
>
>
>

Getting back to basics for a second:

Are you trying to use DIFxAPI or not?

If yes, what is the package type of your IM driver NetService class INF?

Also, what is the package type of your IM driver Net class INF?

Are you using DIFxAPI to install the IM driver Net class INF *before* you
install the NetService class INF?

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Chakri
Sent: Friday, June 18, 2010 5:01 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Problem with SetupCopyOEMInf…

Hello Calin,
Thanks for pointing out the documentation. I have modified the installer to
install the IM driver(this is a teaming driver) first then install the
network driver and I do not see this problem.

My intention in posting this query was to understand if the
DriverPackageInstall and SetupCopyOEMInf are related in anyway in terms of
order of invoking them.

Regards,
Chakri

“Calin Iaru” wrote in message news:xxxxx@ntdev…
> Hi,
>
> I think that what you have are 2 scenarios: hardware first installations
> and software first installation. The software first fails because your
> driver is not WHQL signed. For more information, look at the documentation

> inside the “Device and Driver Installation” tree, “Device and Driver
> Installation Fundamental Topics”/“Driver Signing”/“Signing Drivers for
> Public Release” more specifically.
>
> Regards,
> Calin
>
>
>
> ----- Original Message ----
> From: Chakri
> To: Windows System Software Devs Interest List
> Sent: Mon, June 14, 2010 12:09:01 PM
> Subject: [ntdev] Problem with SetupCopyOEMInf…
>
> Hello Gurus,
>
> I am writing an installer which installs a network device and IM driver.
> It works in every scenario except for when I do not have NIC on the target

> system.
>
> Basically, the DriverPackageInstall call to install the NIC returns
> 0xE000020B (ERROR_NO_SUCH_DEVINST), which is expected. But after that when

> I am doing SetupCopyOEMInf before installing the IM driver, the
> SetupCopyOEMInf returns
> 0xE0000243(ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED).
>
> If the NIC is present on the system or I install the IM driver
> individually, the call goes through fine and I am able to install IM
> driver using INetCfg interface.
>
> I have tried to spawn two threads (just to experiment, sequential though)
> to install NIC and the IM driver, they succeed.
>
> This behavior is seen on all the variants of Windows server 2K3 and 2K8.
>
> Question:
> 1. Is this a known behavior?
> 2. If yes, how to get around it? Any pointers, documentation …
> 3. How does the call sequence of SetupCopyOEMInf and DriverPackageInstall
> affect each other? I suppose they should not.
>
> Regards,
> Chakri
>
> P.S.: I hope I am posting this to right forum. Sincere apologies, if not.
>
> —
> 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
>
>
>
>
>


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

Hello Dave,

Sorry for the delayed response, I was ill.

Are you trying to use DIFxAPI or not?
[Chakri] I am using DIFxAPI only for physical device, which is NIC. For IM
driver, I use INetCfg interface (INetCfgClassSetup::Install). Just before
invoking the interface I make a call to SetupCopyOEMInf for both the
protocol and virtual miniport inf files.

If yes, what is the package type of your IM driver NetService class INF?
[Chakri] Please excuse my ignorance, I didn’t understand the “package type”.
But here is what I have in the inf files.
For protocol inf of the IM driver : Class = NetTrans
For virtual miniport inf of IM driver : Class = Net

Also, what is the package type of your IM driver Net class INF?

Are you using DIFxAPI to install the IM driver Net class INF *before* you
install the NetService class INF?
[Chakri] Same as first question, I do not use DIFxAPI for installing IM
driver; I use INetCfg interface (INetCfgClassSetup::Install).

Regards,
Chakri

“David R. Cattley” wrote in message news:xxxxx@ntdev…
> Getting back to basics for a second:
>
> Are you trying to use DIFxAPI or not?
>
> If yes, what is the package type of your IM driver NetService class INF?
>
> Also, what is the package type of your IM driver Net class INF?
>
> Are you using DIFxAPI to install the IM driver Net class INF before you
> install the NetService class INF?
>
> Good Luck,
> Dave Cattley
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Chakri
> Sent: Friday, June 18, 2010 5:01 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Problem with SetupCopyOEMInf…
>
> Hello Calin,
> Thanks for pointing out the documentation. I have modified the installer
> to
> install the IM driver(this is a teaming driver) first then install the
> network driver and I do not see this problem.
>
> My intention in posting this query was to understand if the
> DriverPackageInstall and SetupCopyOEMInf are related in anyway in terms of
> order of invoking them.
>
> Regards,
> Chakri
>
> “Calin Iaru” wrote in message news:xxxxx@ntdev…
>> Hi,
>>
>> I think that what you have are 2 scenarios: hardware first installations
>> and software first installation. The software first fails because your
>> driver is not WHQL signed. For more information, look at the
>> documentation
>
>> inside the “Device and Driver Installation” tree, “Device and Driver
>> Installation Fundamental Topics”/“Driver Signing”/“Signing Drivers for
>> Public Release” more specifically.
>>
>> Regards,
>> Calin
>>
>>
>>
>> ----- Original Message ----
>> From: Chakri
>> To: Windows System Software Devs Interest List
>> Sent: Mon, June 14, 2010 12:09:01 PM
>> Subject: [ntdev] Problem with SetupCopyOEMInf…
>>
>> Hello Gurus,
>>
>> I am writing an installer which installs a network device and IM driver.
>> It works in every scenario except for when I do not have NIC on the
>> target
>
>> system.
>>
>> Basically, the DriverPackageInstall call to install the NIC returns
>> 0xE000020B (ERROR_NO_SUCH_DEVINST), which is expected. But after that
>> when
>
>> I am doing SetupCopyOEMInf before installing the IM driver, the
>> SetupCopyOEMInf returns
>> 0xE0000243(ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED).
>>
>> If the NIC is present on the system or I install the IM driver
>> individually, the call goes through fine and I am able to install IM
>> driver using INetCfg interface.
>>
>> I have tried to spawn two threads (just to experiment, sequential though)
>> to install NIC and the IM driver, they succeed.
>>
>> This behavior is seen on all the variants of Windows server 2K3 and 2K8.
>>
>> Question:
>> 1. Is this a known behavior?
>> 2. If yes, how to get around it? Any pointers, documentation …
>> 3. How does the call sequence of SetupCopyOEMInf and DriverPackageInstall
>> affect each other? I suppose they should not.
>>
>> Regards,
>> Chakri
>>
>> P.S.: I hope I am posting this to right forum. Sincere apologies, if not.
>>
>> —
>> 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
>>
>>
>>
>>
>>
>
> —
> 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
>
>

Chakri,
The question about package type is relevant only if using DIFxAPI to install your IM driver - which you are not doing.
The DriverPackageType= line in the INF file declares the package type to DIFx. For PnP function drivers associated with a device this typically DriverPackagetType=PlugAndPlay.
So let me see if I have this correct from your previous posts:
Scenario 1: NIC Device Present- DIFxAPI install of NIC driver succeeds.- SetupCopyOEMInf/INetCfg install of IM driver succeeds.
Scenario 2: NIC Device Not Present- DIFxAPI install of NIC driver fails as expected with ‘no such device’ result.- SetupCopyOEMInf of IM driver fails unexpected with certificate error.
Scenario 3: Two threads. I don’t understand what you did here. You say it succeeded but not sure if the NIC was present or not or which install occurred first.
Alternate Scenario 2: NIC Device Not Present- SetupCopyOEMInf/INetCfg install of IM driver succeeds.- DIFxAPI install of NIC driver succeeds.

> I have modified the installer to
> install the IM driver(this is a teaming driver) first then install the
> network driver and I do not see this problem.
>
> My intention in posting this query was to understand if the
> DriverPackageInstall and SetupCopyOEMInf are related in anyway in terms of
> order of invoking them.
>
So I think you have created a scenario in which it seems a side-effect of calling into DIFxAPI and it returning with a failure causes a subsequent operation to fail or change behavior.
Do you specify any flags to DriverPackageInstall()? In particular, do you specify DRIVER_PACKAGE_SILENT or DRIVER_PACKAGE_LEGACY_MODE?
Good Luck,Dave Cattley

Hello Dave,
Thanks for deliberation on the scenarios. The Scenario 2 is the one I have and I intend to understand.
I used the flag DRIVER_PACKAGE_ONLY_IF_DEVICE_PRESENT while calling DriverPackageInstall(). So, the Scenario 1 doesn’t appy.

In the Alternate Scenario 2, the first step (IM Driver install) succeeds, the NIC install fails with ERROR_NO_SUCH_DEVINST, as expected.

Scenario 3 - NIC is absent, the call sequence didn’t matter. The NIC installation (DriverPackageInstall) returns ERROR_NO_SUCH_DEVINST and the IM driver installation succeeds.

Regards,
Chakri
“David Cattley” wrote in message news:xxxxx@ntdev…
Chakri,

The question about package type is relevant only if using DIFxAPI to install your IM driver - which you are not doing.

The DriverPackageType= line in the INF file declares the package type to DIFx. For PnP function drivers associated with a device this typically DriverPackagetType=PlugAndPlay.

So let me see if I have this correct from your previous posts:

Scenario 1: NIC Device Present
- DIFxAPI install of NIC driver succeeds.
- SetupCopyOEMInf/INetCfg install of IM driver succeeds.

Scenario 2: NIC Device Not Present
- DIFxAPI install of NIC driver fails as expected with ‘no such device’ result.
- SetupCopyOEMInf of IM driver fails unexpected with certificate error.

Scenario 3: Two threads. I don’t understand what you did here. You say it succeeded but not sure if the NIC was present or not or which install occurred first.

Alternate Scenario 2: NIC Device Not Present
- SetupCopyOEMInf/INetCfg install of IM driver succeeds.
- DIFxAPI install of NIC driver succeeds.

> > I have modified the installer to
> > install the IM driver(this is a teaming driver) first then install the
> > network driver and I do not see this problem.
> >
> > My intention in posting this query was to understand if the
> > DriverPackageInstall and SetupCopyOEMInf are related in anyway in terms of
> > order of invoking them.
> >

So I think you have created a scenario in which it seems a side-effect of calling into DIFxAPI and it returning with a failure causes a subsequent operation to fail or change behavior.

Do you specify any flags to DriverPackageInstall()? In particular, do you specify DRIVER_PACKAGE_SILENT or DRIVER_PACKAGE_LEGACY_MODE?

Good Luck,
Dave Cattley

Chakri,

If I understand correctly then the issue boils down to the markedly
different result between ?Scenario 2? and ?Alternate Scenario 2? which
differ only in the order in which the (failed) NIC driver install and IM
driver install are performed.

The evidence suggests strongly that DIFxAPI is leaving the system state
(associated with the thread) in such a condition as to negatively impact the
IM driver install in Scenario 2. That seems to suggest that DIFxAPI might
actually have a bug and perhaps you should engage PSS and provide the test
install case for MSFT to analyze. In any event, you have a work-around
(install the IM driver first) and as such, the priority of that PSS
engagement would be understandably low.

The one avenue of further investigation I think of in this case has to do
with COM initialization since it is ?thread context? associated. Since you
are working with INetCfg interfaces, you must have called
CoInitializeEx()/CoUninitialize(), right? Please re-verify that the
handling of COM initialization is working as expected.

You might also try removing the flag DRIVER_PACKAGE_ONLY_IF_DEVICE_PRESENT
just to see if that changes the outcome. The driver (package) will end up
in the driver store and the return value will still indicate that no devices
were present. You can then try to install the IM driver and see if DIFxAPI
has left the system in a different state.

Good Luck,
Dave Cattley

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Chakri
Sent: Wednesday, June 23, 2010 5:13 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Problem with SetupCopyOEMInf…

Hello Dave,
Thanks for deliberation on the scenarios. The Scenario 2 is the one I have
and I intend to understand.
I used the flag DRIVER_PACKAGE_ONLY_IF_DEVICE_PRESENT while calling
DriverPackageInstall(). So, the Scenario 1 doesn’t appy.
?
In the Alternate Scenario 2, the first step (IM Driver install) succeeds,
the NIC install fails with ERROR_NO_SUCH_DEVINST, as expected.
?
Scenario 3 - NIC is absent,?the call sequence didn’t matter. The?NIC
installation (DriverPackageInstall) returns?ERROR_NO_SUCH_DEVINST and the IM
driver installation succeeds.
?
Regards,
Chakri
“David Cattley” wrote in message news:xxxxx@ntdev…
Chakri,

The question about package type is relevant only if using DIFxAPI to install
your IM driver - which you are not doing.

The DriverPackageType= line in the INF file declares the package type to
DIFx. ? For PnP function drivers associated with a device this typically
DriverPackagetType=PlugAndPlay.

So let me see if I have this correct from your previous posts:

Scenario 1: ? NIC Device Present
- DIFxAPI install of NIC driver succeeds.
- SetupCopyOEMInf/INetCfg install of IM driver succeeds.

Scenario 2: ?NIC Device Not Present
- DIFxAPI install of NIC driver fails as expected with ‘no such device’
result.
- SetupCopyOEMInf of IM driver fails unexpected with certificate error.

Scenario 3: ?Two threads. ? I don’t understand what you did here. ?You say
it succeeded but not sure if the NIC was present or not or which install
occurred first.

Alternate Scenario 2: ?NIC Device Not Present
- SetupCopyOEMInf/INetCfg install of IM driver succeeds.
- DIFxAPI install of NIC driver succeeds.

> > I have modified the installer to
> > install the IM driver(this is a teaming driver) first then install the
> > network driver and I do not see this problem.
> >
> > My intention in posting this query was to understand if the
> > DriverPackageInstall and SetupCopyOEMInf are related in anyway in terms
of
> > order of invoking them.
> >

So I think you have created a scenario in which it seems a side-effect of
calling into DIFxAPI and it returning with a failure causes a subsequent
operation to fail or change behavior.

Do you specify any flags to DriverPackageInstall()? ?In particular, do you
specify DRIVER_PACKAGE_SILENT or DRIVER_PACKAGE_LEGACY_MODE?

Good Luck,
Dave Cattley


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

Thanks Dave.
Yes, I already have the workaround in the installer, but I wanted to find
out if this behavior is already known before trying PSS.

I have suspected the COM stuff too, and played with it quite a bit(in fact,
I #if’ed out the COM stuff) and it didn’t matter whether I initialized it
before or after SetupCopyOEMInf.

And finally, I didn’t try removing DRIVER_PACKAGE_ONLY_IF_DEVICE_PRESENT
because one of the pre-requisite for my installer is that it does not
pre-install in a install case. But, for my understanding I think it is worth
trying it out. Thanks for suggesting.

Once again, thank you for taking out time to answer my queries patiently.

Regards,
Chakri

“David R. Cattley” wrote in message news:xxxxx@ntdev…
> Chakri,
>
> If I understand correctly then the issue boils down to the markedly
> different result between “Scenario 2” and “Alternate Scenario 2” which
> differ only in the order in which the (failed) NIC driver install and IM
> driver install are performed.
>
> The evidence suggests strongly that DIFxAPI is leaving the system state
> (associated with the thread) in such a condition as to negatively impact
> the
> IM driver install in Scenario 2. That seems to suggest that DIFxAPI might
> actually have a bug and perhaps you should engage PSS and provide the test
> install case for MSFT to analyze. In any event, you have a work-around
> (install the IM driver first) and as such, the priority of that PSS
> engagement would be understandably low.
>
> The one avenue of further investigation I think of in this case has to do
> with COM initialization since it is ‘thread context’ associated. Since
> you
> are working with INetCfg interfaces, you must have called
> CoInitializeEx()/CoUninitialize(), right? Please re-verify that the
> handling of COM initialization is working as expected.
>
> You might also try removing the flag DRIVER_PACKAGE_ONLY_IF_DEVICE_PRESENT
> just to see if that changes the outcome. The driver (package) will end up
> in the driver store and the return value will still indicate that no
> devices
> were present. You can then try to install the IM driver and see if
> DIFxAPI
> has left the system in a different state.
>
> Good Luck,
> Dave Cattley
>
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Chakri
> Sent: Wednesday, June 23, 2010 5:13 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Problem with SetupCopyOEMInf…
>
> Hello Dave,
> Thanks for deliberation on the scenarios. The Scenario 2 is the one I have
> and I intend to understand.
> I used the flag DRIVER_PACKAGE_ONLY_IF_DEVICE_PRESENT while calling
> DriverPackageInstall(). So, the Scenario 1 doesn’t appy.
>
> In the Alternate Scenario 2, the first step (IM Driver install) succeeds,
> the NIC install fails with ERROR_NO_SUCH_DEVINST, as expected.
>
> Scenario 3 - NIC is absent, the call sequence didn’t matter. The NIC
> installation (DriverPackageInstall) returns ERROR_NO_SUCH_DEVINST and the
> IM
> driver installation succeeds.
>
> Regards,
> Chakri
> “David Cattley” wrote in message news:xxxxx@ntdev…
> Chakri,
>
> The question about package type is relevant only if using DIFxAPI to
> install
> your IM driver - which you are not doing.
>
> The DriverPackageType= line in the INF file declares the package type to
> DIFx. For PnP function drivers associated with a device this typically
> DriverPackagetType=PlugAndPlay.
>
> So let me see if I have this correct from your previous posts:
>
> Scenario 1: NIC Device Present
> - DIFxAPI install of NIC driver succeeds.
> - SetupCopyOEMInf/INetCfg install of IM driver succeeds.
>
> Scenario 2: NIC Device Not Present
> - DIFxAPI install of NIC driver fails as expected with ‘no such device’
> result.
> - SetupCopyOEMInf of IM driver fails unexpected with certificate error.
>
> Scenario 3: Two threads. I don’t understand what you did here. You say
> it succeeded but not sure if the NIC was present or not or which install
> occurred first.
>
> Alternate Scenario 2: NIC Device Not Present
> - SetupCopyOEMInf/INetCfg install of IM driver succeeds.
> - DIFxAPI install of NIC driver succeeds.
>
>> > I have modified the installer to
>> > install the IM driver(this is a teaming driver) first then install the
>> > network driver and I do not see this problem.
>> >
>> > My intention in posting this query was to understand if the
>> > DriverPackageInstall and SetupCopyOEMInf are related in anyway in terms
> of
>> > order of invoking them.
>> >
>
> So I think you have created a scenario in which it seems a side-effect of
> calling into DIFxAPI and it returning with a failure causes a subsequent
> operation to fail or change behavior.
>
> Do you specify any flags to DriverPackageInstall()? In particular, do you
> specify DRIVER_PACKAGE_SILENT or DRIVER_PACKAGE_LEGACY_MODE?
>
> Good Luck,
> Dave Cattley
>
> —
> 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
>
>