in reply to Re: Re: Win32::TieRegistry and Connect Method Errors
in thread Win32::TieRegistry and Connect Method Errors
As I suspected, I was doing something wrong with the NET USE command.
Here's how it should look to connect to a machine:
$list = "net use \\\\$Machine $password /USER:$domain\\$user"; system ("$list");
And then connect as follows: $regKey = $Registry->Connect( $Machine, $target, { Access=>KEY_READ } );
Note that I do not do and explicit or die after the connect attempt since I want to trap the failed machines so I do an if ($regKey) {} later in the code.
Kakaze
|
|---|