locked
DriverPackageInstall and WFP driver installation. RRS feed

  • Question

  • Hi,

    I am trying to install WFP based driver at win7/8 32/64 bit machine using wix.

    First of all, I tried using difx/driver wix element but gets failed on windows 8 32 then wrote the simple c code using DriverPackageInstall but gets failed again.

    DriverPackageInstall returns 2 i.e. inf file not found whereas cat/sys/inf files are kept in same directory.

    DriverPackageInstallA call is made as below:

    DWORD retCode = DriverPackageInstallA("C:\\Installer\\stadrv6x.inf",  DRIVER_PACKAGE_LEGACY_MODE,

                            NULL,
                            &reboot
                            );

    >>>  [SetupCopyOEMInf - C:\Windows\system32\DRVSTORE\stadrv6x_014153B3089A3E17660F066993C1E0AC127EBF58\stadrv6x.inf]
    >>>  Section start 2013/11/27 21:45:41.809
          cmd: DriverInstall.exe
         sto: {Import Driver Package: C:\Windows\system32\DRVSTORE\stadrv6x_014153B3089A3E17660F066993C1E0AC127EBF58\stadrv6x.inf} 21:45:43.884
         sto:      Driver Store   = C:\Windows\System32\DriverStore [Online] (6.2.9200)
         sto:      Driver Package = C:\Windows\system32\DRVSTORE\stadrv6x_014153B3089A3E17660F066993C1E0AC127EBF58\stadrv6x.inf
         sto:      Architecture   = x86
         sto:      Flags          = 0x00000000
         inf:      Provider       = MyCompany, Inc.
         inf:      Class GUID     = {57465043-616c-6c6f-7574-5f636c617373}
         inf:      Driver Version = 11/26/2013,0.0.0.1
         inf:      Catalog File   = stadrv6x.cat
         inf:      Version Flags  = 0x00000010
         flq:      Copying 'C:\Windows\system32\DRVSTORE\stadrv6x_014153B3089A3E17660F066993C1E0AC127EBF58\stadrv6x.cat' to 'C:\Users\MADHUS~1\AppData\Local\Temp\{73fc221e-afc4-5445-b8bd-420963cfa358}\stadrv6x.cat'.
         flq:      Copying 'C:\Windows\system32\DRVSTORE\stadrv6x_014153B3089A3E17660F066993C1E0AC127EBF58\stadrv6x.inf' to 'C:\Users\MADHUS~1\AppData\Local\Temp\{73fc221e-afc4-5445-b8bd-420963cfa358}\stadrv6x.inf'.
    !!!  flq:      Error installing file (0x00000002)
    !!!  flq:      Error 2: The system cannot find the file specified.
    !    flq:           SourceFile   - 'C:\Windows\system32\DRVSTORE\stadrv6x_014153B3089A3E17660F066993C1E0AC127EBF58\Stadrv6x32.sys'
    !    flq:           TargetFile   - 'C:\Users\MADHUS~1\AppData\Local\Temp\{73fc221e-afc4-5445-b8bd-420963cfa358}\Stadrv6x32.sys'
    !!!  cpy:      Failed to copy file 'C:\Windows\system32\DRVSTORE\stadrv6x_014153B3089A3E17660F066993C1E0AC127EBF58\Stadrv6x32.sys' to 'C:\Users\MADHUS~1\AppData\Local\Temp\{73fc221e-afc4-5445-b8bd-420963cfa358}\Stadrv6x32.sys'. Error = 0x00000002
    !!!  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:      FileQueueCommit aborting!
    !!!  flq:      Error 995: The I/O operation has been aborted because of either a thread exit or an application request.
    !!!  sto:      Failed to copy driver package to 'C:\Users\MADHUS~1\AppData\Local\Temp\{73fc221e-afc4-5445-b8bd-420963cfa358}'. Error = 0x00000002
         sto: {Import Driver Package: exit(0x00000002)} 21:45:45.787
    !!!  inf: Failed to import driver package into driver store
    !!!  inf: Error 2: The system cannot find the file specified.
    <<<  Section end 2013/11/27 21:45:45.880
    <<<  [Exit status: FAILURE(0x00000002)]


    >>>  [SetupCopyOEMInf - C:\Windows\system32\DRVSTORE\stadrv6x_014153B3089A3E17660F066993C1E0AC127EBF58\stadrv6x.inf]
    >>>  Section start 2013/11/27 21:45:45.880
          cmd: DriverInstall.exe
    <<<  Section end 2013/11/27 21:45:45.880
    <<<  [Exit status: FAILURE(0x00000002)]

    Could you please help me to find out actual cause?

    Regards,

    Anand Choubey

    Thursday, November 28, 2013 5:30 AM

Answers

All replies

  • This topic is beyond the scope of this forum.  you may have better luck posting in a driver generic forum.

    Have you verified "C:\Windows\system32\DRVSTORE\stadrv6x_014153B3089A3E17660F066993C1E0AC127EBF58\s
    tadrv6x.inf" is indeed present? Also the legacy mode flag shouldn't be used (no longer supported since Vista).

    Hope this helps,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------

    Thursday, November 28, 2013 7:01 PM
    Moderator
  • Thanks for reply.

    stadrv6.inf is not in C:\Windows\system32\DRVSTORE\stadrv6x_014153B3089A3E17660F066993C1E0AC127EBF58.

    Copy into drvstore is done by difx call not by application.

    I use difx apis for other network driver like IM/miniport and always works.

    Questions are:

    Can DfxAPP be used to install WFP driver, if yes then what is INF guide lines for it?

     RunDLL32.Exe syssetup,SetupInfObjectInstallAction is not suitable for MSI installers since it does not returns any success and failure code and at error condition show "installation failed" msg box.

    Last option is: use CreateService/StartService/DeleteService apis. It works for me but I am not sure till now whether it would work for MS signed driver because these apis can install driver with out cat file too.

    Could you please guide me what is correct way to install WFP MS signed driver?

    Regards,

    Anand Choubey

    Sunday, December 1, 2013 8:11 AM
  • You should not use the driver install framework for wfp drivers. This is geared towards PnP drivers i.e there is a physical device.  Instead, there is a subcomponent called the driver install package.  this should allow you to copy the necessary files into the driver store, and install the driver. http://msdn.microsoft.com/en-us/library/windows/hardware/ff547559(v=vs.85).aspx

    Hope this helps,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------


    Monday, December 2, 2013 3:57 AM
    Moderator
  • Thanks Dusty!

    I figured-out that no need to go behind MS signing for my WFP call-out driver just cross signed sys file then works fine and no need of cat and inf file.

    https://knowledge.verisign.com/support/ssl-certificates-support/index?page=content&id=SO5820

    Above link helped me.

    Regards,

    Anand Choubey

    Tuesday, December 3, 2013 11:28 AM