in reply to Win32::AdminMisc Problems

I recently came across the same problem whilst reinstating an old script that we use for polling Windows boxes for their diskspace.

I also tried installing the missing DLL, which didn't solve the problem. In the end I rewrote my script to use Win32::DriveInfo instead.

I'd suggest not bothering with Win32::AdminMisc and use Net::DNS and even the built-in function gethostbyname.

use strict; use warnings; use Socket; my $Ifile = 'c:/Perl/RC/PC_List.txt'; # P R O C E S S I N G #---------------------# open IPF, "<$Ifile" or die "\n\tCan't open $Ifile :: $!\n"; while (<IPF>) { chomp; my @fields = split /\|/, $_; my $hostname = $fields[0]; print "\n\tProcessing PC $hostname\n"; if ( my $ipAddress = gethostbyname( $hostname ) ) { print "\n\tThe Ip address for $hostname is", inet_ntoa( $ipAddre +ss ), "\n" ; } else { print "\n\tUnable to resolve IP address for $hostname\n" ; } } close IPF or die "\n\tCan't close $Ifile :: $!\n" ;

I never used to have any trouble with Win32::AdminMisc when using ActiveState's Perl 5.8.7, I suspect it is an incompatibility with their 5.8.8 builds