Jump to content

Network Printer


Recommended Posts

Hi,

I am working to write my own script for automatically installing a network printer without all the "user" clicking and input. I got to a point where there was a "list box" of printers to choose from and I dont know how to script it for scrolling through that list and selecting it.

My second question would be when it comes time to manually put in the IP address of the network printer, how would I script that??

Thanks so much for anyone's help.

Link to comment
Share on other sites

  • Use WMI
  • Query Win32_Printer Class
  • read the attributes and look for all those with attribute 16 (Network Printers) {64 if u need local Printers}
  • Populate them to an array and use it as source for your list box.

There is a possibility AddPrinterConnection Method may work (try it out)

Edited by rajeshontheweb
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...