Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I need to list out all printers names present in network. Is it possible to get all network printer names using C#, .net?
Posted

1 solution

Depends, what is your network architecture? Everything on a domain and part of Active Directory? If yes then its relatively easy to query AD objects. If you are just talking about a home network or workgroup network, then this is much more difficult as it involves network discovery.

Please update your question with your network architecture and we can post better solutions.

[Edit]

http://www.encodedna.com/2013/04/show-printers-using-wmi.htm[^]

Retreiving a list of network computer names using C#[^]

Please realize that network discovery is not very reliable and is very slow. The first link above shows printers that are installed on the local computer, the second uses network discovery. There are certain options you need to turn on in Windows to allow network discovery, and even then sequential runs of the network discovery routine can give differing results.

[/Edit]
 
Share this answer
 
v2
Comments
Pradeep Kumar G M 23-Jul-13 1:50am    
Thanks, Actually I do not have an idea of what is active directory and all. But here we have workgroup network.

What ever you have given me the link explains how we can get the installed printers list. But it is not giving me any Network printers list. Actually I want result like Bonjor application. I have read LLMNR library will help us in Printer Name Resolution. But I am not finding any hint how we can use it in .net. Can I get help on this?
Ron Beyer 23-Jul-13 1:56am    
I updated the solution with some examples.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900