none
DriverPackageInstall returns error 1627 (ERROR_FUNCTION_FAILED) indicating could not get services associated with driver package RRS feed

  • Question

  • I have an INF install that I'm making with DriverPackageInstall().  The function returns error 1627 (ERROR_FUNCTION_FAILED).  The DIFxAPI callback registered with SetDifxLogCallback() provides the diagnostic that error event 3 (DIFXAPI_ERROR) occurred.  The text of the message is "Could not get services associated with driver package."

    The x86 and x64 services are installed with sections that look like:

    [DefaultInstall.ntx86.Services]
    AddService = DRIVER1,,DRIVER1.Service.x86
    AddService = DRIVER2,,DRIVER2.Service.x86

    [DefaultInstall.ntamd64.Services]
    AddService = DRIVER1,,DRIVER1.Service.x64
    AddService = DRIVER2,,DRIVER2.Service.x64

    The install fails for both x86 and x64 systems in the same manner.  However, the install only fails when I keep both AddService lines in the section.  If I comment out either one, the function runs successfully for both x86 and x64.  Therefore, I wouldn't think the problem is with the service sections themselves since they both work independently.  Only when they are both present does the function fail.

    Any help would be appreciated.  Thanks.

    Tuesday, October 8, 2013 3:33 PM

Answers

  • I can state authoritatively that for many driver package types, DriverPackageInstall() requires you to have exactly 1 service.
    • Proposed as answer by Jason Knichel [MSFT] Monday, October 14, 2013 5:11 PM
    • Marked as answer by simdoc Monday, October 14, 2013 5:12 PM
    Monday, October 14, 2013 5:10 PM

All replies

  • First run ChkInf over the INF file and fix all errors and warnings.  Second, after you do this turn on SetupApi logging and try to install again, and post the log.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Tuesday, October 8, 2013 3:40 PM
  • neither service is marked as 0x00000002 (SPSVCINST_ASSOCSERVICE). did you look at setupapi.dev.log ?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, October 8, 2013 4:28 PM
  • Thanks for your input!

    It's a filter driver so is SPSVCINST_ASSOCSERVICE applicable?  I'm still fixing errors/warnings in chkinf.  I'll get that log information shortly.

    Tuesday, October 8, 2013 7:36 PM
  • are both DRIVER1 and DRIVER2 filters? are you declaring a Need/Includes directive elsewhere to pull in another INF that installs a function driver? what does setupapi.dev.log say?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, October 8, 2013 10:11 PM
  • They are both filters.  No other INFs are pulled in.  Here the result from the log (DRIVER1=nlem1402; DRIVER2=nlemsys) with LogLevel=0x7070:

    [Boot Session: 2013/10/08 09:18:31.093]

    >>>  [SetupQueueCopy]
    >>>  Section start 2013/10/08 09:31:55.244
          cmd: difxapi  /install:netlib.inf
         flq: CopyStyle      - 0x00000000
    <<<  Section end 2013/10/08 09:31:55.260
    <<<  [Exit status: SUCCESS]

         flq: {FILE_QUEUE_COPY}
         flq: CopyStyle      - 0x00000000
         flq: SourceRootPath - 'C:\Users\AdminUser\Desktop\NetLibDriver'
         flq: SourcePath     - 'x64'
         flq: SourceFilename - 'nlem1402.sys'
         flq: TargetDirectory- 'C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\x64'
         flq: TargetFilename - 'nlem1402.sys'
         flq: SourceDesc     - 'Application Distribution'
         flq: SourceTagfile  - ''
         flq: {FILE_QUEUE_COPY exit(0x00000000)}

    >>>  [SetupQueueCopy]
    >>>  Section start 2013/10/08 09:31:55.260
          cmd: difxapi  /install:netlib.inf
         flq: CopyStyle      - 0x00000000
    <<<  Section end 2013/10/08 09:31:55.260
    <<<  [Exit status: SUCCESS]

         flq: {FILE_QUEUE_COPY}
         flq: CopyStyle      - 0x00000000
         flq: SourceRootPath - 'C:\Users\AdminUser\Desktop\NetLibDriver'
         flq: SourcePath     - 'x64'
         flq: SourceFilename - 'nltools.dll'
         flq: TargetDirectory- 'C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\x64'
         flq: TargetFilename - 'nltools.dll'
         flq: SourceDesc     - 'Application Distribution'
         flq: SourceTagfile  - ''
         flq: {FILE_QUEUE_COPY exit(0x00000000)}

    >>>  [SetupQueueCopy]
    >>>  Section start 2013/10/08 09:31:55.260
          cmd: difxapi  /install:netlib.inf
         flq: CopyStyle      - 0x00000000
    <<<  Section end 2013/10/08 09:31:55.260
    <<<  [Exit status: SUCCESS]

         flq: {FILE_QUEUE_COPY}
         flq: CopyStyle      - 0x00000000
         flq: SourceRootPath - 'C:\Users\AdminUser\Desktop\NetLibDriver'
         flq: SourcePath     - ''
         flq: SourceFilename - 'nlxpclr.dll'
         flq: TargetDirectory- 'C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413'
         flq: TargetFilename - 'nlxpclr.dll'
         flq: SourceDesc     - 'Application Distribution'
         flq: SourceTagfile  - ''
         flq: {FILE_QUEUE_COPY exit(0x00000000)}

    >>>  [SetupQueueCopy]
    >>>  Section start 2013/10/08 09:31:55.260
          cmd: difxapi  /install:netlib.inf
         flq: CopyStyle      - 0x00000000
    <<<  Section end 2013/10/08 09:31:55.260
    <<<  [Exit status: SUCCESS]

         flq: {FILE_QUEUE_COPY}
         flq: CopyStyle      - 0x00000000
         flq: SourceRootPath - 'C:\Users\AdminUser\Desktop\NetLibDriver'
         flq: SourcePath     - 'x64'
         flq: SourceFilename - 'nlemsys.sys'
         flq: TargetDirectory- 'C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\x64'
         flq: TargetFilename - 'nlemsys.sys'
         flq: SourceDesc     - 'Application Distribution'
         flq: SourceTagfile  - ''
         flq: {FILE_QUEUE_COPY exit(0x00000000)}

    >>>  [SetupQueueCopy]
    >>>  Section start 2013/10/08 09:31:55.260
          cmd: difxapi  /install:netlib.inf
         flq: CopyStyle      - 0x00000000
    <<<  Section end 2013/10/08 09:31:55.275
    <<<  [Exit status: SUCCESS]

         flq: {FILE_QUEUE_COPY}
         flq: CopyStyle      - 0x00000000
         flq: SourceRootPath - 'C:\Users\AdminUser\Desktop\NetLibDriver'
         flq: SourcePath     - 'x64'
         flq: SourceFilename - 'nlemlog.dll'
         flq: TargetDirectory- 'C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\x64'
         flq: TargetFilename - 'nlemlog.dll'
         flq: SourceDesc     - 'Application Distribution'
         flq: SourceTagfile  - ''
         flq: {FILE_QUEUE_COPY exit(0x00000000)}

    >>>  [SetupQueueCopy]
    >>>  Section start 2013/10/08 09:31:55.275
          cmd: difxapi  /install:netlib.inf
         flq: CopyStyle      - 0x00000000
    <<<  Section end 2013/10/08 09:31:55.275
    <<<  [Exit status: SUCCESS]

         flq: {FILE_QUEUE_COPY}
         flq: CopyStyle      - 0x00000000
         flq: SourceRootPath - 'C:\Users\AdminUser\Desktop\NetLibDriver'
         flq: SourcePath     - 'x64'
         flq: SourceFilename - 'nlem1402.dll'
         flq: TargetDirectory- 'C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\x64'
         flq: TargetFilename - 'nlem1402.dll'
         flq: SourceDesc     - 'Application Distribution'
         flq: SourceTagfile  - ''
         flq: {FILE_QUEUE_COPY exit(0x00000000)}
         flq: {_commit_file_queue}
         flq: CommitQ DelNodes=0 RenNodes=0 CopyNodes=6
         flq: {SPFQNOTIFY_STARTQUEUE}
         flq: {SPFILENOTIFY_STARTQUEUE}
         flq: {SPFILENOTIFY_STARTQUEUE - exit(0x00000001)}
         flq: {SPFQNOTIFY_STARTQUEUE - returned 0x00000001}
         flq: {_commit_copy_subqueue}
         flq: subqueue count=6
         flq: {SPFQNOTIFY_STARTSUBQUEUE}
         flq: {SPFILENOTIFY_STARTSUBQUEUE}
         flq: {SPFILENOTIFY_STARTSUBQUEUE - exit(0x00000001)}
         flq: {SPFQNOTIFY_STARTSUBQUEUE - returned 0x00000001}
         flq: Commit: ---Top of loop---  Next CopyQueue count=6
         flq: source media:
         flq: Description  - [Application Distribution]
         flq: SourcePath   - [C:\Users\AdminUser\Desktop\NetLibDriver\x64]
         flq: SourceFile   - [nlem1402.sys]
         flq: Flags        - 0x00000000
         flq: {SPFQNOTIFY_NEEDMEDIA}
         flq: {SPFILENOTIFY_NEEDMEDIA}
         flq: {SPFILENOTIFY_NEEDMEDIA - exit(0x00000001)}
         flq: {SPFQNOTIFY_NEEDMEDIA - returned 0x00000001}
         flq: source media: SPFQOPERATION_DOIT
         flq: Commit: Loose file phase...
         flq: Found file: C:\Users\AdminUser\Desktop\NetLibDriver\x64\nlem1402.sys
         flq: {_commit_copyfile}
         flq: {_queue_unwind_and_backup}
         flq: C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\x64\nlem1402.sys
         flq: {_queue_unwind_and_backup exit OK}
         flq: {SPFQNOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY - exit(0x00000002)}
         flq: {SPFQNOTIFY_STARTCOPY - returned 0x00000002}
         flq: SPFQNOTIFY_STARTCOPY: returned 2 (is or is treated as SPFQOPERATION_SKIP).
         flq: {SPFQNOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY - exit(0x00000001)}
         flq: {SPFQNOTIFY_ENDCOPY - returned 0x00000001}
         flq: {_commit_copyfile exit OK}
         flq: Found file: C:\Users\AdminUser\Desktop\NetLibDriver\x64\nltools.dll
         flq: {_commit_copyfile}
         flq: {_queue_unwind_and_backup}
         flq: C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\x64\nltools.dll
         flq: {_queue_unwind_and_backup exit OK}
         flq: {SPFQNOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY - exit(0x00000002)}
         flq: {SPFQNOTIFY_STARTCOPY - returned 0x00000002}
         flq: SPFQNOTIFY_STARTCOPY: returned 2 (is or is treated as SPFQOPERATION_SKIP).
         flq: {SPFQNOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY - exit(0x00000001)}
         flq: {SPFQNOTIFY_ENDCOPY - returned 0x00000001}
         flq: {_commit_copyfile exit OK}
         flq: Found file: C:\Users\AdminUser\Desktop\NetLibDriver\nlxpclr.dll
         flq: {_commit_copyfile}
         flq: {_queue_unwind_and_backup}
         flq: C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\nlxpclr.dll
         flq: {_queue_unwind_and_backup exit OK}
         flq: {SPFQNOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY - exit(0x00000002)}
         flq: {SPFQNOTIFY_STARTCOPY - returned 0x00000002}
         flq: SPFQNOTIFY_STARTCOPY: returned 2 (is or is treated as SPFQOPERATION_SKIP).
         flq: {SPFQNOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY - exit(0x00000001)}
         flq: {SPFQNOTIFY_ENDCOPY - returned 0x00000001}
         flq: {_commit_copyfile exit OK}
         flq: Found file: C:\Users\AdminUser\Desktop\NetLibDriver\x64\nlemsys.sys
         flq: {_commit_copyfile}
         flq: {_queue_unwind_and_backup}
         flq: C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\x64\nlemsys.sys
         flq: {_queue_unwind_and_backup exit OK}
         flq: {SPFQNOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY - exit(0x00000002)}
         flq: {SPFQNOTIFY_STARTCOPY - returned 0x00000002}
         flq: SPFQNOTIFY_STARTCOPY: returned 2 (is or is treated as SPFQOPERATION_SKIP).
         flq: {SPFQNOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY - exit(0x00000001)}
         flq: {SPFQNOTIFY_ENDCOPY - returned 0x00000001}
         flq: {_commit_copyfile exit OK}
         flq: Found file: C:\Users\AdminUser\Desktop\NetLibDriver\x64\nlemlog.dll
         flq: {_commit_copyfile}
         flq: {_queue_unwind_and_backup}
         flq: C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\x64\nlemlog.dll
         flq: {_queue_unwind_and_backup exit OK}
         flq: {SPFQNOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY - exit(0x00000002)}
         flq: {SPFQNOTIFY_STARTCOPY - returned 0x00000002}
         flq: SPFQNOTIFY_STARTCOPY: returned 2 (is or is treated as SPFQOPERATION_SKIP).
         flq: {SPFQNOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY - exit(0x00000001)}
         flq: {SPFQNOTIFY_ENDCOPY - returned 0x00000001}
         flq: {_commit_copyfile exit OK}
         flq: Found file: C:\Users\AdminUser\Desktop\NetLibDriver\x64\nlem1402.dll
         flq: {_commit_copyfile}
         flq: {_queue_unwind_and_backup}
         flq: C:\Windows\system32\DRVSTORE\netlib_08429B686265B1BB3E577588C9BC7512C5960413\x64\nlem1402.dll
         flq: {_queue_unwind_and_backup exit OK}
         flq: {SPFQNOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY}
         flq: {SPFILENOTIFY_STARTCOPY - exit(0x00000002)}
         flq: {SPFQNOTIFY_STARTCOPY - returned 0x00000002}
         flq: SPFQNOTIFY_STARTCOPY: returned 2 (is or is treated as SPFQOPERATION_SKIP).
         flq: {SPFQNOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY}
         flq: {SPFILENOTIFY_ENDCOPY - exit(0x00000001)}
         flq: {SPFQNOTIFY_ENDCOPY - returned 0x00000001}
         flq: {_commit_copyfile exit OK}
         flq: Commit: Check for CopyQueue completion...
         flq: Commit: All files processed in CopyQueue
         flq: Commit: ---End of loop---
         flq: {SPFQNOTIFY_ENDSUBQUEUE}
         flq: {SPFILENOTIFY_ENDSUBQUEUE}
         flq: {SPFILENOTIFY_ENDSUBQUEUE - exit(0x00000001)}
         flq: {SPFQNOTIFY_ENDSUBQUEUE - returned 0x00000001}
         flq: {_commit_copy_subqueue exit OK}
         flq: {SPFQNOTIFY_ENDQUEUE}
         flq: {SPFILENOTIFY_ENDQUEUE}
         flq: {SPFILENOTIFY_ENDQUEUE - exit(0x00000001)}
         flq: {SPFQNOTIFY_ENDQUEUE - returned 0x00000001}
         flq: {_commit_file_queue exit OK}

    Wednesday, October 9, 2013 5:27 AM
  • by filter, do you mean net filter? or a pnp filter? the latter requires an FDO be specified on the stack.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, October 9, 2013 6:28 AM
  • It's file system driver used for encryption.
    Wednesday, October 9, 2013 2:22 PM
  • Why do you need to add 2 drivers?  Unfortunately, I believe DriverPackageInstall() only allows certain driver package types to have 1 service.

    Wednesday, October 9, 2013 4:57 PM
  • Where did you see that? That's definitely an issue if it exists. However I prefer not to speculate on that. That should be a definite yes or no. Unfortunately the two must be installed. I possibly could split it but that will complicate the distribution.
    Wednesday, October 9, 2013 6:38 PM
  • I can't state this authoratively (Jason working for Microsoft may be able to) but I have observed limitations like he has stated.  What is to stop you from rearranging your package to call DriverPackageInstall twice once for each driver, splitting the INF file, etc?


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, October 9, 2013 6:44 PM
  • That likely can be done but everything that supports it has been developed on the other approach. I would think there would be a clear yes/no to its working before redoing that effort.
    Wednesday, October 9, 2013 7:24 PM
  • I can state authoritatively that for many driver package types, DriverPackageInstall() requires you to have exactly 1 service.
    • Proposed as answer by Jason Knichel [MSFT] Monday, October 14, 2013 5:11 PM
    • Marked as answer by simdoc Monday, October 14, 2013 5:12 PM
    Monday, October 14, 2013 5:10 PM
  • Thanks for confirming that.
    Monday, October 14, 2013 5:12 PM