none
C# implements the search function when the control panel adds printers RRS feed

  • Question

  • I hope to achieve like Windows system, control panel - add printer system search printer function, I do not know how to achieve this search function, can have god help me?

    Wednesday, November 6, 2019 2:44 AM

All replies

  • Hi Cooper-L,

    Thank you for posting here.

    I hope the following references could be helpful.

    1. Managing Printers Programatically using C# and WMI
    2. Is there a .NET way to enumerate all available network printers?

    If I have any misunderstanding, please provide more information about your question, and it will help us to analyze your problem.

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 6, 2019 10:05 AM
    Moderator
  • I hope to achieve like Windows system, control panel - add printer system search printer function, I do not know how to achieve this search function, can have god help me?

    using (Process p = new Process())
    {
        p.StartInfo.FileName = "rundll32.exe";
        p.StartInfo.Arguments = "printui.dll, PrintUIEntry /il";
        p.Start();
    }


    Wednesday, November 6, 2019 11:18 AM
  • Thank you for your reply Xingyu Zhao

    However, these did not find uninstalled network printers and Shared printers, and now I can scan to the network printers through SNMP. But I can't add printer through IP, I think I can try the method you gave me.


    • Edited by Cooper-L Thursday, November 7, 2019 12:51 AM
    Thursday, November 7, 2019 12:48 AM
  • Thank you for your reply

    I want to use my interface, not the system interface

    Thursday, November 7, 2019 12:49 AM
  • Hi Cooper-L,

    I note that you have posted a new question which is similar to this one in the forum, so I will give my reply in that question.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 7, 2019 9:45 AM
    Moderator