Sorry here is the code I have written:
use Win32::TieRegistry 0.20 (Delimiter=>"#", ArrayValues=>0);
$pound = $Registry->Delimiter("/");
$machinename =
$Registry->{"LMachine/SYSTEM/CurrentControlSet/Control/ComputerName/ComputerName//ComputerName"};
print "$machinename\n";
If I am logged in as a user with administrative rights, it prints the
computername if not it just prints a carrage return. I actually got round
this particular instance by using the adminmisc extension to retrieve the
computername, but I am looking at doing some more auditing which will
require retrieving registry keys from machines where the user does not have
administrative rights so any help that can be given will be greatly
appreicated
Thanks in advance,
Mike
>From: "Jenda Krynicky" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Retrieveing registry keys without admin rights
>Date: Thu, 16 Nov 2000 17:42:29 -0100
>
> > I have written a simple script to retrieve the value of a single key in
>the
> > registry which works fine when logged into the Windows NT4 Workstation
> > machine as an administrative user. But when i try and run it as a user
>who
> > is not in the administrators group it fails, even though the same user
>can
> > view the selected key in regedit or with the resourcekit program
>reg.exe.
> > Has anyone got any suggestions as to what i'm doing wrong (i'm using
> > activestate perl 5.6.0.620)
> >
> > thanks,
> > Mike
>
>Not unless you show us the code.
>
>Just a wild guess ... you are trying to open the key for reading
>right? Not for writing ... try to use OpenEx() and specify that you
>only want to read.
>
>Jenda
>
>== [EMAIL PROTECTED] == http://Jenda.McCann.cz ==
> FUCK THE ARMY!
> Myself
>_______________________________________________
>Perl-Win32-Admin mailing list
>[EMAIL PROTECTED]
>http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin