Enumerate and Install Remote Printers from Service ( SYSTEM Account )

Posted on 2006-04-19
Last Modified: 2010-04-17
My code for Enumerating and Installing Remote Printers is part of a service which runs in the Local SYSTEM Account.
SYSTEM Account does not have sufficient rights to access Network Resources as a result remote printers are not enumerated.
I tried impersonating the Guest Account and was able to enumerate the Remote Printers but when i tried to install the printer AddPrinterConnection failed with errorcode = 2. (The Specified File not found).

How do i resolve this issue ? Is there any other approach other than impersonation ?
Question by:ac506
    1 Comment

    Accepted Solution

    The script needs to run under an account which is in the local administrators group on the computer you want to install printers.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    pre4 challenge 19 75
    Visual xHarbour 1 50
    bigHeights  challenge 13 43
    noX challenge 17 54
    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    This article will show, step by step, how to integrate R code into a R Sweave document
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now