Sibi John wrote:
> hi,
> 
>       Is it possible to write to Hkey_Current_User remotely using a perl
> script. ???
> 
> use Win32::TieRegistry;
> use Win32::AdminMisc;
> open(User,'c:\utils\computer.txt');
> while (<User>)
> {
> 
> $machkey=$Registry->Open("\\\\$_\\CUser\\Control Panel\\International");
> if ($machkey)
>       {
>               print " Changing $_ ";
>               $hello=$machkey->CreateKey( "Calendars");
>               $hello1=$hello->CreateKey( "TwoDigitYearMax")
>       }
> else 
>       { 
>               print " Unable to Open";
>       }
> }
> 
> 
> This  Script cannot open the specified computers from the computer.txt
> file.. Any suggesstions ????

What do you mean can't open ?  Where do you get an error - on the if ?

I see at least one problem (assuming you have newlines in your file), try
chomp ing $_ after the while to remove the newline.

-- 
   ,-/-  __      _  _         $Bill Luebkert   ICQ=162126130
  (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to