If you include the following:

use Win32API::Registry qw( regLastError );
and then ...die "Error: ", regLastError();
you'll get a much more accurate error message than with ...die $^E;

I learned this from posting a similar question last week.  ;-)

Eric

-----Original Message-----
From: Ismail Mutlu [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 9:05 PM
To: [EMAIL PROTECTED]
Subject: TieRegistry question.


Hello All,
The following script works for Administrator and power users, but it gives
the following error when I run it as a regular user:

The system could not find the environment option that was entered at
D:\recallit\bin\reg_test.pl line 4.

Needles to say I am a newbe.
Thanks for your help,

Cheers

Iso

####-- reg_test.pl--####
use strict;
use Win32::TieRegistry ( Delimiter=>"/", ArrayValues=>0 );
$Registry->Delimiter("/");                  # Set delimiter to "/".
my $swKey= $Registry->{"HKEY_LOCAL_MACHINE/SOFTWARE/"} || die $^E;

####--------------------####

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

Reply via email to