my $enum; eval {$enum = Win32::OLE::Enum->new("WinNT://$comp")}; unless ($enum) { print "$comp is not NT/2000\n"; return; } #### sub RegConnect { my ($pObj, $ExitCode); my $comp = shift; my $pString = "perl -MWin32::TieRegistry -e " . '"' . '$Registry->Connect(' ."'" . $comp . "', 'LMachine');" . '"'; Win32::Process::Create($pObj, "c:\\perl\\bin\\perl.exe", $pString, 0, NORMAL_PRIORITY_CLASS, ".")|| die "Can't create Perl Process: $!\n"; $pObj->Wait(7000); $pObj->GetExitCode($ExitCode); if ($ExitCode) { $pObj->Kill(1); return 0; } return 1; }