Results 1 to 4 of 4

Thread: Using printui to find all available network printers

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    675

    Using printui to find all available network printers

    RodDog888's code:
    VB Code:
    1. Private Sub cmdGlobalAdd_Click()
    2.     Shell "Rundll32 printui.dll,PrintUIEntry /ga /c\\localcomputername /n\\servername\printername", vbNormalFocus
    3. End Sub
    4.  
    5. Private Sub cmdGlobalDelete_Click()
    6.     Shell "Rundll32 printui.dll,PrintUIEntry /gd /c\\localcomputername /n\\servername\printername", vbNormalFocus
    7. End Sub

    I don't have internet access (except to this site) at work at the moment, so I can't look up the command line parameters for printui. Does anyone know how to use printui to find all printers on the network? Not just printers installed on a workstation, but all available printers on the network?

    Or, is there another way to do this? Possibly by looping through each workstation on the network and grabbing its installed printers (which I also can't figure out how to do)? All I can do so far is find the installed printers on my own workstation.

    Thanks
    VB.Net 2008
    .Net Framework 2.0

    "Must you breathe? 'Cause I need heaven..."

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Using printui to find all available network printers

    Quote Originally Posted by 18experience
    RodDog888's code:
    VB Code:
    1. Private Sub cmdGlobalAdd_Click()
    2.     Shell "Rundll32 printui.dll,PrintUIEntry /ga /c\\localcomputername /n\\servername\printername", vbNormalFocus
    3. End Sub
    4.  
    5. Private Sub cmdGlobalDelete_Click()
    6.     Shell "Rundll32 printui.dll,PrintUIEntry /gd /c\\localcomputername /n\\servername\printername", vbNormalFocus
    7. End Sub

    I don't have internet access (except to this site) at work at the moment, so I can't look up the command line parameters for printui. Does anyone know how to use printui to find all printers on the network? Not just printers installed on a workstation, but all available printers on the network?

    Or, is there another way to do this? Possibly by looping through each workstation on the network and grabbing its installed printers (which I also can't figure out how to do)? All I can do so far is find the installed printers on my own workstation.

    Thanks
    Hi,

    You can do it another way, here's a link:

    http://msdn2.microsoft.com/en-us/library/ms811681.aspx

    It could be not the best way but you can try.

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    675

    Re: Using printui to find all available network printers

    Sparrow,
    I don't have internet access (except to this site) here at work. I know, I know, I will talk to them soon. I haven't been here that long and this hasn't come up until today. Is there any way you could copy/paste or paraphrase?
    Thanks
    VB.Net 2008
    .Net Framework 2.0

    "Must you breathe? 'Cause I need heaven..."

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    675

    Re: Using printui to find all available network printers

    Just to clarify, I know how to install a printer. I just need to (in VB) get a list of all available printers.
    VB.Net 2008
    .Net Framework 2.0

    "Must you breathe? 'Cause I need heaven..."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width