[cifs-protocol] [REG:118092719108783] Clarification on parsing printer driver inf failure - MSPAR RPC InstallPrinterDriverFromPackage

Obaid Farooqi obaidf at microsoft.com
Tue Oct 2 22:33:18 UTC 2018


Hi Justin:
I think I know why it is failing. The pszDriverName in your RpcAsyncInstallPrinterDriverFromPackage is equal to testdriver. None of the drivers in your package is named testdeiver. Try the names from inf you are using like e.g.
“Xerox Global Print Driver V4 PCL6”

Regards,
Obaid Farooqi
Escalation Engineer | Microsoft

Exceeding your expectations is my highest priority.  If you would like to provide feedback on your case you may contact my manager at ramagane at Microsoft dot com

From: Justin Stephenson <jstephen at redhat.com>
Sent: Tuesday, October 2, 2018 3:49 PM
To: Obaid Farooqi <obaidf at microsoft.com>
Cc: MSSolve Case Email <casemail at microsoft.com>; cifs-protocol at lists.samba.org
Subject: Re: [REG:118092719108783] Clarification on parsing printer driver inf failure - MSPAR RPC InstallPrinterDriverFromPackage

Thank you Obaid.

I uploaded the requested files, the trace includes the full test operation of the following programmatic steps:

  - establish smb connection
  - create directory inside print$ share
  - copy driver files and directories over SMB protocol
  - call RpcAsyncUploadPrinterDriverPackage method
  - call RpcAsyncInstallPrinterDriverFromPackage method

I hope it is not a problem that the first steps here are included in the trace.

-Justin

On Tue, Oct 2, 2018 at 4:14 PM Obaid Farooqi <obaidf at microsoft.com<mailto:obaidf at microsoft.com>> wrote:
Hi Justin:
From the error that you sent me, I can tell that the installation fails because windows does not find the driver. I need some traces to see exactly where the error happening. I have uploaded a batch file called startTrace.bat to the following link:

File Transfer - Case 118092719108783<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Ffiles%3Fworkspace%3DeyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ3c2lkIjoiNGNiZDAwMjMtZWEzMi00YjllLWEzNzctZjY1ZDNjNjE3NjAzIiwic3IiOiIxMTgwOTI3MTkxMDg3ODMiLCJhcHBpZCI6ImU2ZWU0M2ViLTBmYmMtNDU0Ni1iYzUyLTRjMTYxZmNkZjRjNCIsInN2IjoidjEiLCJycyI6IkV4dGVybmFsIiwid3RpZCI6ImMxMDE0ODNlLWYyMGUtNDIyYS1hMzRkLTY3MzY5OTlmYzA2MiIsImlzcyI6Imh0dHBzOi8vYXBpLmR0bW5lYnVsYS5taWNyb3NvZnQuY29tIiwiYXVkIjoiaHR0cDovL3NtYyIsImV4cCI6MTU0NjI4NTg3NSwibmJmIjoxNTM4NTA5ODc1fQ.Zq3KkNnGGxOe1mSRxlwphPMkgCoJuvco5-vvqcq1tDxv2QcAP5291UF3XmL4W1cj0c0jfodOAR5A1OECgStSYXJtpJvz6lry-cjJiQ9_luhnHXALyB7Fj_uHr9QM-Jk3GyvGVMYzny4fnRXOCjHBLyzZutyk6wTZiQqivGP9e9PxCG-ua6Jjxp4Qhh0KPVNUQbsXQFTsAWzlk2KXkXIs9PV5QRPP5e-LY_6kny5tQBs4TUwN_v-NWnuNyDhTbzFNYG5bdql_DDuTca5cR7LpBPx175y6hp1hDSTp8lhdlT4NRiSV-OOMjsesw8RB5ro8_jvbUGU1mB4VesmEHE9q5A%26wid%3D4cbd0023-ea32-4b9e-a377-f65d3c617603&data=02%7C01%7Cobaidf%40microsoft.com%7C50136072370d4101d1fc08d628a87919%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636741101398187525&sdata=hBp8%2BGMLEDaxUSX%2FhFqJboJaD5Yx8kr3JLa0SLgjNS8%3D&reserved=0>
Username: 118092719108783_forJustin at dtmxfer.onmicrosoft.com<mailto:118092719108783_forJustin at dtmxfer.onmicrosoft.com>
Password: 9n;dAjY3

Please make sure to login with the given credentials. If you click on the link and are already logged in, please logout and login again using credentials provided above.

Please download the startTrace.bat file to your Windows print server and execute the following steps:

1. open an elevated command prompt
2. cd to directory where you downloaded startTrace.bat and execute the following command:
            >startTrace.bat
3. When you see the command prompt again and no error is printed out, the tracing has started successfully. The message on screen will also inform you about the name and location of the trace file (among other things).
4. reproduce your issue.
5. after successful repro of the issue, execute the following command to stop tracing
            >netsh trace stop
6. there will be two files created in c:\ directory; printscan_print.etl and printscan_print.cab. Please upload these two files to the link above and let me know.


Regards,
Obaid Farooqi
Escalation Engineer | Microsoft

Exceeding your expectations is my highest priority.  If you would like to provide feedback on your case you may contact my manager at ramagane at Microsoft dot com

From: Justin Stephenson <jstephen at redhat.com<mailto:jstephen at redhat.com>>
Sent: Friday, September 28, 2018 3:32 PM
To: Obaid Farooqi <obaidf at microsoft.com<mailto:obaidf at microsoft.com>>
Cc: MSSolve Case Email <casemail at microsoft.com<mailto:casemail at microsoft.com>>; cifs-protocol at lists.samba.org<mailto:cifs-protocol at lists.samba.org>
Subject: Re: [REG:118092719108783] Clarification on parsing printer driver inf failure - MSPAR RPC InstallPrinterDriverFromPackage

Hello Obaid,

It should be the DCERPC calls starting in frame number 15525.

The inputs I am providing to the Install method are:

                pszServer                : '\\WIN-AD2016'
                pszInfPath               : 'C:\Windows\System32\DriverStore\FileRepository\xeroxglobalprintdriver_pcl6.inf_amd64_37d0e6a31ac96d78\xeroxglobalprintdriver_pcl6.inf'
                pszDriverName            : 'testdriver'
                pszEnvironment           : 'Windows x64'
            dwFlags                  : 0x00000001 (1)
                   1: IPDFP_COPY_ALL_FILES


Kind regards,
Justin Stephenson
Red Hat

On Fri, Sep 28, 2018 at 4:01 PM Obaid Farooqi <obaidf at microsoft.com<mailto:obaidf at microsoft.com>> wrote:
Hi Justin:
Can you please let me know the relevant frame numbers in your network trace?

Regards,
Obaid Farooqi
Escalation Engineer | Microsoft

Exceeding your expectations is my highest priority.  If you would like to provide feedback on your case you may contact my manager at ramagane at Microsoft dot com

From: Justin Stephenson <jstephen at redhat.com<mailto:jstephen at redhat.com>>
Sent: Friday, September 28, 2018 7:52 AM
To: Obaid Farooqi <obaidf at microsoft.com<mailto:obaidf at microsoft.com>>
Cc: MSSolve Case Email <casemail at microsoft.com<mailto:casemail at microsoft.com>>; cifs-protocol at lists.samba.org<mailto:cifs-protocol at lists.samba.org>
Subject: Re: [REG:118092719108783] Clarification on parsing printer driver inf failure - MSPAR RPC InstallPrinterDriverFromPackage

Hi Obaid,

From the Windows 10 Client I open the Print Management console, right-click Print Servers and add the Windows 2016 Server then right-click 'Drivers' and go through the Add Driver steps - selecting Have Disk and pointing to this INF file to install.

Thank you.

-Justin

On Thu, Sep 27, 2018 at 6:16 PM Obaid Farooqi <obaidf at microsoft.com<mailto:obaidf at microsoft.com>> wrote:
Hi Justin:
I’ll help you with this issue and will be in touch as soon as I have an answer.
Can you please send me the steps you performed to install this driver from a Windows 10 machine to a remote print server?

Regards,
Obaid Farooqi
Escalation Engineer | Microsoft

Exceeding your expectations is my highest priority.  If you would like to provide feedback on your case you may contact my manager at ramagane at Microsoft dot com

From: Edgar Olougouna
Sent: Thursday, September 27, 2018 1:53 PM
To: Justin Stephenson <jstephen at redhat.com<mailto:jstephen at redhat.com>>
Cc: MSSolve Case Email <casemail at microsoft.com<mailto:casemail at microsoft.com>>; cifs-protocol at lists.samba.org<mailto:cifs-protocol at lists.samba.org>
Subject: [REG:118092719108783] Clarification on parsing printer driver inf failure - MSPAR RPC InstallPrinterDriverFromPackage

[+ case number, cc casemail, bcc dochelp]
Hello Justin, The case number 118092719108783 has been created for this inquiry. One of our engineers will follow-up soon.

Regards,
Edgar

From: Justin Stephenson <jstephen at redhat.com<mailto:jstephen at redhat.com>>
Sent: Thursday, September 27, 2018 1:17 PM
To: Interoperability Documentation Help <dochelp at microsoft.com<mailto:dochelp at microsoft.com>>
Cc: cifs-protocol at lists.samba.org<mailto:cifs-protocol at lists.samba.org>
Subject: Clarification on parsing printer driver inf failure - MSPAR RPC InstallPrinterDriverFromPackage

Hello,

I am writing code which calls InstallPrinterDriverFromPackage() against Windows Server 2016 providing a valid pszInfPath retrieved from the output of a successful UploadPrinterDriverPackage() call. The upload is successful but the RPC InstallPrinterDriverFromPackage consistently fails with HRESULT 0x80070705(ERROR_UNKNOWN_PRINTER_DRIVER).

Upon the failure, event ID Number 213 is logged in the PrintService Operational event viewer with the following message:

Parsing inf (C:\Windows\System32\DriverStore\FileRepository\xeroxglobalprintdriver_pcl6.inf_amd64_37d0e6a31ac96d78\xerosglobalprintdriver_pcl6.inf) for printer driver testdriver failed (processor architecture Windows x64), error code 0x705, HRESULT 0x80070705.

The UserData details show:
  SetupParseInf
    Label: ParseInfAndCommitFileQueue
    Message: PreSelectDriverEx failed
    InfPath: C:\Windows\System32\DriverStore\FileRepository\xeroxglobalprintdriver_pcl6.inf_amd64_37d0e6a31ac96d78\xerosglobalprintdriver_pcl6.inf
    DriverName: testdriver
    InstallSection: -
    ProcessorArchitecture: Windows x64
    LastError: 0x705
    HResult: 0x80070705

From a Windows 10 Client, I am able to install this printer driver using the same .inf file onto the remote Print Server manually without any issues.

I ran the InfVerif.exe tool from the Windows Developer Kit against the provided inf file and only a single warning was issued about an unused string. I would like to know why the inf parsing is failing, or if there some way to validate a user-provided inf file in the same way that is performed internally by this RPC install method.

I am attaching a packet capture taken on the Windows Server during the failure and also the .inf file used(excluding the several other driver installation files and directories).

Any other ideas what is happening here would be appreciated.

Thank you.

Justin Stephenson
Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/cifs-protocol/attachments/20181002/a67c0750/attachment-0001.html>


More information about the cifs-protocol mailing list