ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activeperl
activeperl
RE: Finding a printer; need help
by Deane Rothenmaier other posts by this author
May 7 2008 8:57AM messages near this date
RE: Finding a printer; need help | Re: Finding a printer; need help
Scott,

That pretty much gives the same information I got from WMI in my own 
attempts (Win32_Printer). It seems to be reading a list of "installed" 
printers; which seems to mean "printers that have drivers installed but 
are not necessarily physically present." That is, the printers you'd see 
in Control Panel/Printers.

What I've been asked to do is report on whether a printer is physically 
present, and what printer it is. Note that even something like polling the 
LPTx: (or USB_x, or USBx, or COMx:) ports won't work, 'cause I don't think 
that would pick up a connected printer that's not turned on. Or will it? 
And would it be able to identify it?  Don't think so (but I could be 
wrong...).

The required output would be something like this:

        Port    Printer
        LPT1:   H-P Laserjet 4Si

But if and only if the H-P Laserjet IS ACTUALLY CONNECTED TO port LPT1:. 
(Sorry for shouting.)

(Just realized I'm probably beating this into the ground, but it's a 
distinction with a difference, one that I need. Sorry...)

Deane Rothenmaier
Programmer/Analyst
Walgreens Corp.
847-914-5150

There is something fascinating about science. One gets such wholesale 
returns of conjecture out of such a trifling investment of fact. -- Mark 
Twain
Thread:
Deane Rothenmaier
Scott Campbell
Deane Rothenmaier
John W Kennedy

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved