C# Obtaing Network Printer location

Posted on 2007-07-24
Last Modified: 2009-04-22

Im Current working with a c# form..
I have a listbox with printernames and a label
When user click this listbox I want to set label.Text = PrinterLocation.
How do i get the location of my network printer so i can put it ine the label?
Question by:Balltown
    LVL 5

    Accepted Solution

    LVL 12

    Assisted Solution

    here is a less expensive way to do this (no dependancies on permissions to WMI:
                foreach (string printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
                    //this will iterate through each printer installed on the system with a full UNC
                    if (printer.ToLower().EndsWith(listbox.Text.ToLower()))
                        //this is your printer name so here it is...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    759 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

    12 Experts available now in Live!

    Get 1:1 Help Now