Hallo All,
please help ---> which are wrong ?
I want read and write the registry into many remote computers and I can not
my own read !
----------------------------------------------------------------------------
-------------------------------------------------------
use warnings;
use strict;
$|++;
use Win32::OLE('in');
use Win32::OLE::Variant;
my $HKEY_LOCAL_MACHINE =0x80000002;
my @pc = ( '' ) ;
Win32::OLE->Option ('Warn' => 3);
foreach my $server (@pc) {
my $Locator = Win32::OLE->new('WbemScripting.SWbemLocator') or
die "Kann Locator-Object nicht erzeugen:
".Win32::OLE->LastError()."\n";
$Locator->{Security_}->{impersonationLevel} = 3;
my $Service = $Locator->ConnectServer($server,'root\default') or
die "Kann Server-Object nicht erzeugen:
".Win32::OLE->LastError()."\n";
my $reg = $Service->Get("StdRegProv") or
die "Kann REg-Object nicht erzeugen:
".Win32::OLE->LastError()."\n";
my $a = Variant (VT_ARRAY|VT_UI1,VT_EMPTY);
my $sPath = 'HARDWARE';
print STDOUT $reg->EnumKey("$HKEY_LOCAL_MACHINE",$sPath,$a);
# This print a 0 for ok ! ?
print STDOUT '*' x 80,"\n",$a;
# This print nothing (only 80 x *)
print STDOUT '*' x 80,"\n",@$a->Get;
# This print nothing (only 80 x *)
}
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------
Mit freundlichen Gr�ssen
Joachim G�rner
Information Technology Systemintegration (ITS)
ADAC e.V., Am Westpark 8, 81373 M�nchen
Tel.: (089) 76 76 27 83 Fax: (089) 76 76 34 22
mailto:[EMAIL PROTECTED]
www.adac.de
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs