Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Printers (NT)

by t0mas (Priest)
on Jun 07, 2000 at 22:58 UTC ( #16935=note: print w/replies, xml ) Need Help??


in reply to Printers (NT)

This works for me, maybe for you.
use Win32::TieRegistry; $printerKey= $Registry->{"HKEY_LOCAL_MACHINE\\System\\CurrentControlSe +t\\Control\\Print\\Printers\\"} or die "Can't read Printers key: $^E\n"; @printers= keys( %{$printerKey} ); foreach $printer (@printers) { print $printerKey->{$printer."\\Name"}." ". $printerKey->{$printer."\\Printer Driver"}." ". $printerKey->{$printer."DsSpooler\\serverName"}; }
The registry is a nightmare so beware...

/brother t0mas

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://16935]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2017-07-21 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (321 votes). Check out past polls.