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 John W Kennedy other posts by this author
May 7 2008 11:02AM messages near this date
RE: Finding a printer; need help | Basic PERL Script
On May 7, 2008, at 11:57 AM, Deane.Rothenmaier@[...].com wrote:
>  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...).


You're being asked to do the impossible. There is no difference  
between no printer and a printer turned off. You couldn't tell even in  
assembler language. The available options are:

    Look for printer queues in the operating system (which may reflect  
a long-removed printer, a virtual printer, like a PDF writer or FAX  
writer, or a multi-mode printer, a printer that appears to be more  
than one printer, such as one PCL and one PostScript.

    Look for attached and turned-on printers. If you do this, don't  
forget that printers can also connect via Ethernet, etc..

-- 
John W Kennedy
A proud member of the reality-based community.



_______________________________________________
ActivePerl mailing list
ActivePerl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
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