Sign in to follow this  
Followers 0
markj2009

Network Printer

2 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

  • 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

Share this post


Link to post
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
Sign in to follow this  
Followers 0