Does any one have any scripts for editing the registry on remote machines that I could use as en example. I have to make some reg edits to multiple machines and i have no experience in regedit scripts.
Thanks
Hi James,
Here's a snippet that works for me:
use Win32; use Win32::TieRegistry (TiedRef => \$Registry, Delimiter => "/");
modify_remoteregistry ( "server" ); exit;
sub modify_remoteregistry { my $machine = shift;
# Connect to remote Registry - get handle on key guaranteed to exist
if ( my $remoteKey = $Registry->{"//$machine/LMachine/"} ) {
print "\n updating Registry...\n";# Get the registered installer of the OS
# Reg key broken up for e-mail readability
my $perl_ver = $remoteKey->{"SOFTWARE/ActiveState/"}->
{"ActivePerl//CurrentVersion"};
print "Perl version $perl_ver on $machine.\n"; # Change the Perl version to build 635, just for fun
$remoteKey->{"SOFTWARE/ActiveState/"}->
{"ActivePerl//CurrentVersion"} = "635"; } else {
print ("Unable to connect to Registry on \\\\$machine.\n" .
"Check you have appropriate rights...\n");
}}
# eof
Cheers, Mark
_______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
