Thanks to one of our bretheren I've now managed to install Win32::AdminMisc - Thanks again Rob - however when I run it I'm getting an error indicating a dll is missing. Is there a way of tracking down this dll and installing it for those of us that think Windows are for looking through!? For those of an inquisitive nature, at this point in time all I'm trying to do is resolve the IP addresses for DNS entries. This is part of a 900 PC upgrade that our Support people normally do but due to a bereavement and an employee leaving there is no-one else to look at this so being an inquisitive sort (and being someone that using Perl on UNIX platforms) I got lumbered! Unfortunately the timescale for this task is very short. The code I'm using - pinched from one of Dave Roth's books is :-
#!/usr/bin/perl -w
use strict ;
use Win32::AdminMisc ;
# S C A L A R S
#----------------#
my $hostname = undef ;
my $ipAddress = undef ;
my $Ifile = "c:\\Perl\\RC\\PC_List\.txt" ;
# A R R A Y S
#-------------#
my @fields = () ;
#
# P R O C E S S I N G
#---------------------#
open IPF, "<$Ifile" or die "\n\tCan't open $Ifile :: $!\n" ;
while (<IPF>) {
chomp ;
@fields = split /\|/, $_ ;
$hostname = $fields[0] ;
print "\n\tProcessing PC $hostname\n" ;
if ( $ipAddress = Win32::AdminMisc::GetHostAddress($hostname) ) {
print "\n\tThe Ip address for $hostname is $ipAddress\n" ;
}
else
{
print "\n\tUnable to resolve IP address for $hostname\n" ;
}
}
close IPF or die "\n\tCan't close $Ifile :: $!\n" ;
When I try and run this now it complains with the following (in a windows box):-
This application has failed to start because MSVCR70.dll was not found. Re-installing the application may fix this problem.
On the command prompt window the following appears:-
Can't load 'C:/Perl/site/lib/auto/Win32/AdminMisc/AdminMisc.dll' for m
+odule Win3
2::AdminMisc: load_file:The specified module could not be found at C:/
+Perl/lib/D
ynaLoader.pm line 230.
at C:\Perl\RC\Get_PC_IP.pl line 4
Now unless windows is case sensitive the AdminMisc.DLL is exactly where it says it can't find it! Any help would be most appreciated.
Thanks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.