Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2016-08-31 02:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (426 votes). Check out past polls.