Click here to get back home

TieRegistry with IPConfig

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
TieRegistry with IPConfig Cosmic Cruizer 04-01-2008
Posted by Cosmic Cruizer on April 1, 2008, 10:17 pm
Please log in for more thread options
I'm trying to remotely look at the NIC cards on W2K3 servers that I have
admin accounts on. When I run the following it gives me an error:

use strict;
use Win32::IPConfig;

my $ipconfig;
my $host = "some IP address"; # Changed the IP address for posting
$ipconfig = Win32::IPConfig->new($host); # This is where it fails when
ran with admin account.
print "hostname=", $ipconfig->get_hostname, "\n"; # This is where it
fails when ran without admin account.

This happens with admin account
C:\NIC>nic.pl
Can't use an undefined value as an ARRAY reference at
C:/Perl/site/lib/Win32/TieRegistry.pm line 720.

This happens without using admin account (It's not first getting
Win32::IPConfig->new($host))
C:\NIC>nic.pl
Can't call method "get_hostname" on an undefined value at C:\NIC\nic1.pl
line 7.

Any suggestions on what I need to do to fix this problem?

Is it failing because TieRegistry.pm is not able to get the registry
settings for the NIC?

(I have not been having luck with anything I've tried to do to get the
NIC info from remote servers.)

Similar ThreadsPosted
Win32::TieRegistry March 3, 2006, 7:53 am
TieRegistry Overlapped Error March 8, 2008, 11:42 am
Getting permissions using Win32::TieRegistry March 9, 2008, 3:20 pm
Win32::TieRegistry Logon User Name March 9, 2005, 12:56 am
Retrieving a registry data type using TieRegistry April 19, 2006, 5:59 am
Win32::TieRegistry -- replace string in the whole HKLM November 21, 2006, 4:57 am
use Win32::TieRegistry if ($^O =~ /win32/i) June 1, 2006, 12:58 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap