Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Network Printers (XP Pro)

    Hi,

    In my job I do a lot of adding printers from our server to machines. Two questions have arisen and I wonder if there are simple answers?

    1. Is there any CMD I can use to give me the list of printers on a specific server? The way when you type in servername a drop down list comes through in the add Printer Wizard?

    2. More importantly, is there a script / VB was to automate adding a printer from the server?

    What I want to do is to put together a script / .exe that will display all the printers on a specific server, and then allow you to choose one which will then be added to a machine. I would run this exe locally. Any thought appreciated. I have looked at code for API calls to ad printers which I may have to wade through, but was wondering if there were simpler ways...

    Thanx
    Thanks,

    pmatz

  2. #2
    Silver Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

  3. #3
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network Printers (XP Pro)

    thanks kaplin, will work through this and post back.
    Thanks,

    pmatz

  4. #4
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network Printers (XP Pro)

    Hi again, well, I have found a much simpler way using the following code:

    Dim net
    Set net = CreateObject("WScript.Network")
    net.AddWindowsPrinterConnection "serverprinter shared name"

    as a VBScript or from with VB / VBA.

    I was looking for something like this. Now i just have to find out how to get all the printer share names off the server, and how to change the properties of the printer once installed... This post may reappear in the VB forum!
    Thanks,

    pmatz

Posting Permissions

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