Hi,
Does anyone know how to fiddle with timeouts when using
Win32::TieRegistry?
I have a routine which walks through my IP space, figuring out whether or
not I have read access to the registry of each machine. If I do, I want
to do something (install a patch); if I don't, then I want to move on to
the next IP address.
[...]
# If we can attach to the registry and read System{Identifier}, set
# $ours to 1
if ($key = $Registry->Open("//$target/LMachine/HARDWARE/DESCRIPTION/System/",
{Access=>KEY_READ}) ) {
if ($identifier = $key->GetValue("Identifier") ) {
$ours = 1;
}
else {
$ours = 0;
}
}
else {
$ours = 0;
}
Works fine. But on machines which aren't "ours", Win32::TieRegistry is
persistent ... spends ~25 seconds trying before giving up. I'm staring at
a packet trace right now ... spends most of its time trying and failing to
establishing a TCP connection to port 139 and then port 445 ... eventually
it tries, and succeeds, in connecting to port 135, does some RPC stuff,
tears down the connection, and moves on.
Anyway, I'd like to speed this up. Blowing 25 seconds on a machine to
which I don't have access burns a lot of time ... I have thousands of
machines to traverse, most of which I don't own.
Does anyone know of a way to tell Win32::TieRegistry not to bother with
ports 139 and 445? Or to shrink its timeouts? Or, can anyone think of
another (faster) way I could prove to myself whether or not I have
sufficient privileges to read a remote machine's registry?
--sk
Stuart Kendrick
FCHRC
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs