From: <[EMAIL PROTECTED]>
> I am a relative new comer to this list. I have used the win32 ppm
> modules to perform local (on my own machine) calls and they work fine.
>
> I need to use my Perl scripts to :
>
> 1. connect to a remote PC (Windows - but -- could be NT,XP,ME
> maybe 95/98 - a dying breed in our shop) 2. determine what OS is
> running NT (Srv or Wks), W2K (wks, server) W2K TSE (maybe some
> thin clients also)
>
> I will run this script as domain admin, so that I will have sufficient
> authority.
use Win32::Registry;
...
foreach $computer (@computers) {
my $rHKLM;
unless ($rHKLM = $HKML->Connect( $computer))
print "Cannot connect to $computer : $^E\n";
next;
}
$version = $rHKLM->Open('SOME\Key')->GetValue("ValueName")
# I don't remember where exactly is this info stored.
# simply use $rHKLM just like you use $HKLM
...
$rHKLM->Close();
}
Jenda
P.S.: You could even use
$version = Win32::Registry::Open(
"\\\\$computername\\HKEY_LOCAL_MACHINE\\Some\\Key"
)->GetValue("ValueName")
if you want ;-)
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin