Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Installed Printers on Network Computer

Status
Not open for further replies.

greg0303

Technical User
May 5, 2006
94
CA
I was wondering if there is a way to query a computer on the network and check to see what printers are install for the current logged on user. Currently I am using the following with mixed results:
Set objWMIService = GetObject("winmgmts:\\" & COMPUTERNAME & "\root\cimv2")
Set colPrinter = objWMIService.ExecQuery("Select * from Win32_Printer")

For Each objPrinter in colPrinter
strHTML = strHTML & objPrinter.caption & "<br>"
Next

This will provide me with locally installed printers and sometimes (very few) network installed printers. I want to be able to always find out all the computers the user has installed.

Thanks.
 
This isn't the best solution but perhaps it can spark another idea, how about using the SHell object to execute a net view command which will list all computers, and you can query from there for all the computers listed?
 
I can already find the computers I want to query, what I need is to be able to tell what printers are installed for a user logged which is currently logged onto that computer. This is for help desk so that I can quickly pull up information on a user, what processes they are running, what programs are installed etc. The only thing that I am having trouble with is displaying the printers they have installed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top