Yes it is slightly offtopic. But you could check if there was a global policy in place. Some companies don't want people touching the registry. You might also remove and add your machine to the domain. I have seen dorked machine accounts do strange things.

Some other considerations:

What if the machine is down. Tie-Registry will give you a can't open the registry error. Which at times could be misleading and make you walk to the machine.

If you make use of Net::Ping you could give yourself a down message.

Anothing. If you have a lousy Windows ME on the network. Well you don't have Remote Registry access so you will have to code around it.

Here is a partial snippet of a domain virus report I wrote.

if ($p->ping($computer)) { if ($key = $Registry->Open("/$computer/LMachine/SYSTEM/CurrentCont +rolSet/" . "Control/ComputerName/ComputerName/", {Access=>KEY_REA +D}) ) { unless ($name = $key->GetValue("ComputerName")) { print "Could not attach to read ComputerName o +n $computer\n"; printf $fh "Could not attach to read ComputerN +ame on $computer\n"; }

The ping takes care of machines that are down and the open took care of registry access issues.


In reply to Re: Re: Modifying Win32 registry on remote hosts by Marza
in thread Modifying Win32 registry on remote hosts by ej

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.