in reply to Modifying Win32 registry on remote hosts

I have some code which uses Win32::TieRegistry.

Make sure you have permission to modify the registry on the box. It will require you to have local or domain administrator rights, which you can usually do like this:

$output = `net use \\\\$server\\ipc\$ \"$password\" \/user:$domain\\$l +ogin`; if ($output =~ /success/) { do_something(); } else { die "could not connect to $server!\n"; }


This assumes you're using ActivePerl on a Win2K box, by the way. I have no idea how this works from a UNIX box.

/rgds

<-> In general, we find that those who disparage a given operating system, language, or philosophy have never had to use it in practice. <->

Replies are listed 'Best First'.
(tye)Re: Modifying Win32 registry on remote hosts
by tye (Sage) on Nov 21, 2002 at 01:16 UTC
    I have no idea how this works from a UNIX box.

    It doesn't. Although I have heard of people working on porting Win32::TieRegistry to Unix, I haven't heard of any results and I suspect that the remote access stuff is not part of it.

    As to the original question, it would help to know what version of Win32::TieRegistry is being used (and what version of Win32API::Registry as well), and what $^E is. It is also better to use regLastError() [ which requires use Win32API::Registry qw( regLastError ); ] instead of $^E (which can get overwritten, especially with some versions of Perl).

    Using Win32::NetResource is perhaps a cleaner way to authenticate to the remote machine if that is part of the problem.

            - tye