Privileges required to print PDF files from Local System or Local Service accounts

Hi

We are testing out the VeryPDF command line PDF printer in a new environment and we have come up against a major headache.

The software is called D3, which is a relation database environment previous known as PICK.

D3 runs as a service on Windows.

The service is run under the Local System or Local Service account which allows us to run a Windows sub-process and run the PDFPrint command on that.

The PDFPrint command fails due to a lack of privilege on executing the SetDefaultPrinter API call.

If we log into Windows as a Power User we can run PDFPrint directly on a Windows command window and it works.

However running the D3 service under that user will not allow a Windows sub-process to execute.

If we run the D3 service under an administrator account, we can run a Windows sub-process and run PDFPrint successfully.

But the user needs to be an "ad admin" account with a fixed password and the client is not willing to grant an account like that for security reasons.

This leaves us with a Catch-22:

* the account that D3 is normally run under will not run PDFPrint because of the API;

* As a Power User we can run PDFPrint but D3 will not run a sub-process

* And an admin user will do both but is a security risk to the client and so we can't use one on a permanent basis.

I have been in communication with our D3 support, VeryPDF support and the client's IT section trying to get PDFPrint to be usable and I'm getting nowhere all because of that one API call.

Is there any way that PDFPrint can select the printer to print to without getting caught up on that API call?

I do not know why that call should fail under either the Local System or Local Service accounts.

Customer
------------------------------------------------------


We suggest you may run pdfprint.exe by "VeryPDFComRunCmd COM Component", you may download "VeryPDFComRunCmd COM Component" from this web page to try,

http://www.verydoc.com/exeshell.html#VeryPDFComRunCmd_COM_Component

You can configure "VeryPDFComRunCmd COM Component" to run inside Administrator user account, when pdfprint.exe be called from "VeryPDFComRunCmd COM Component", pdfprint.exe will own Administrator privilege automatically.

Please look at following web page about how to configure "VeryPDFComRunCmd COM Component" to run inside Administrator user account,

http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

You can call pdfprint.exe from your source code by following sample code,

<%

set VeryPDFCom = Server.CreateObject("VeryPDFCom.RunCmd")
dim nRetVal, bRet
strRet = VeryPDFCom.RunCmd2("D:\VeryPDF\pdfprint.exe D:\test.pdf", 5)
Response.Write strRet & vbCrlf

%>

VeryPDF

School See Also:

https://www.verypdf.com/wordpress/201109/how-do-i-call-pdfprint-from-windows-service-or-local-system-to-print-the-pdf-file-to-network-printer-2310.html

https://www.verypdf.com/wordpress/201311/how-to-print-a-pdf-file-to-network-printer-from-windows-service-39509.html

https://www.verypdf.com/wordpress/201109/pdf-printer-cant-print-pdf-file-to-network-printer-from-windows-service-2309.html

https://www.verypdf.com/wordpress/201408/how-to-print-pdf-file-to-canon-printer-11x17-size-paper-40976.html

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

One Reply to “Privileges required to print PDF files from Local System or Local Service accounts”

  1. Hello,

    We cannot use RUNAS as the password cannot be passed into the command as part of the command line.

    Customer
    ——————————————–
    Thanks for your message, you can use our CmdAsUser.exe or VeryPDFComRunCmd COM Component to instead of RunAs.exe application, you may download them from following web page to try,

    http://www.verydoc.com/exeshell.html#CmdAsUser_Command_Line_Tool

    With CmdAsUser.exe application, you can pass the UserName and Password from command line directly, then you can run pdfprint.exe from Administrator user account to print the PDF files, this will overcome permission problems.

    “VeryPDFComRunCmd COM Component” is a COM Component, you can configure it to be run from any user account, you can use it to overcome privilege restrictions too.

    VeryPDF

    VN:F [1.9.20_1166]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.20_1166]
    Rating: 0 (from 0 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!