Here's a sample in Perl.

use strict;
use Win32::Registry;
use vars qw ($HKEY_LOCAL_MACHINE );

my $server = 'LINCHI';
my $Registry_HKLM;

$HKEY_LOCAL_MACHINE->Win32::Registry::Connect($server, $Registry_HKLM);
$Registry_HKLM or die "Unable to Connect to HKLM on $server\n";

my $sqlRoot;
my ($key, $value);

$Registry_HKLM->Open('Software\Microsoft\MSSQLServer', $sqlRoot);

if ($sqlRoot) {
   $sqlRoot->Open('MSSQLServer', $key);
   if ($key) {

     print "MSSQLServer key is there.\n";
   }
}

Linchi

-----Original Message-----
From: Warren Cundy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 4:11 PM
To: NT 2000 Discussions
Subject: Checking registries remotely


Hi guys,

I'm wondering if anybody has a script that can be used to check the
registries of remote machines.  Specifically I'm looking for the existence
of a key, and the value (DWORD) if it does exist.  No writes would be
necessary.. are there any tools or sample scripts somebody can point me to?


Thanks.

-Warren


------
You are subscribed as [EMAIL PROTECTED]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to [EMAIL PROTECTED]


------
You are subscribed as [email protected]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to