Actually, Perl is often perfect for this. The Policy Editor is good for forcing changes that your users keep undoing (something I don't have a need for and hate when I see others do it). But I find lots of uses for remote registry changes. For example, using VNC (a free "PC Anywhere" tool), batch updates of passwords on dozens of servers would be a pain or unworkable using either of your suggestions.

my $Reg; use Win32::TieRegistry( TiedRef => \$Reg, Delimiter => "/", ArrayValues => 1 ); for my $mach ( @ARGV ) { my $remReg= $Reg->{"//$mach/LMachine/"} or do { warn "Can't access ${mach}'s registry: $^E\n"; next; } my $linux= $remReg->{"Software/Slackware/Linux/CurrentVersion/ +"} or die "Can't read ${mach}'s SW/SW/Linux/: $^E\n"; $linux->{"Passwords//root"}= "guessme" or die "Can't modify ${mach}'s root password: $^E\n"; }

(Note that the above code is just "silly" in that you can't install Linux as an application under Win32 and even if you did you probably wouldn't set the passwords as plain-text in the registry.)

I actually have a script that lets you define a remote installation file describing what file to copy to the remote machine and what changes to make to the registry. You can use it to install software locally (it was used to automate installation of third-party software on machines we sold) or to install something on a whole list of remote machines in one step. Existing tools were not up to this task because the registry changes are not uniform and most "sysdiff"-like tools have no or very limited ability to make the changes context sensitive.

For the original poster, it is usually much better to give us the example code that you tried and couldn't get to work along with complete details about how it doesn't work. Asking vague questions and asking for examples usually doesn't get you as many answers nor nearly as good of answers.


In reply to RE: RE: setting remote registry values by why
in thread setting remote registry values by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.