help with Win32::TieRegistry

help with Win32::TieRegistry

am 27.08.2008 23:17:28 von anthony.okusanya

This is a multipart message in MIME format.
--===============1714006351==
Content-Type: multipart/alternative;
boundary="=_alternative 0074F4D0862574B2_="

This is a multipart message in MIME format.
--=_alternative 0074F4D0862574B2_=
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii

Greetings All
I am having trouble using the Win32::TieRegistry's CreateKey
method
sample code is given below. It does not create the key.
Im not sure what Im missing here.

#========================================
use Win32::TieRegistry (Delimiter => "/",
SplitMultis => 1, AllowLoad => 1,
qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ
KEY_READ KEY_WRITE KEY_ALL_ACCESS ),
);

if($Registry->CreateKey("LMachine/SOFTWARE/TestKey")) {
print "Reg Key created \n";
}
else {
print "Failed to create key \n";
}

#========================================

I can however create the key using (much easier syntax I know)
$Registry->{"LMachine/SOFTWARE/TestKey"} = {};

As always Thanks in Advance for your assistance


Tony B. Okusanya
"Live Life By Design And Not From Crisis to Crisis"
U.S. BANCORP made the following annotations
------------------------------------------------------------ ---------
Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation.



------------------------------------------------------------ ---------


--=_alternative 0074F4D0862574B2_=
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=us-ascii



Greetings All

        I
am having trouble using the Win32::TieRegistry's CreateKey method


sample code is given below. It does
not create the key.


Im not sure what Im missing here.



#========================================

use Win32::TieRegistry (Delimiter =>
"/",


        SplitMultis
=> 1,  AllowLoad => 1,


        qw( REG_SZ
REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ


           
KEY_READ KEY_WRITE KEY_ALL_ACCESS ),


    );



if($Registry->CreateKey("LMachine/SOFTWARE/TestKey"))
{


        print
"Reg Key created \n";


}

else {

        print
"Failed to create key \n";


}



#========================================




I can however create the key using (much
easier syntax I know)


$Registry->{"LMachine/SOFTWARE/TestKey"}
= {};




As always Thanks in Advance for your assistance






Tony B. Okusanya

"Live Life By Design And Not From Crisis to Crisis"

U.S. BANCORP made the following annotations
------------------------------------------------------------ ---------
Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation.



------------------------------------------------------------ ---------


--=_alternative 0074F4D0862574B2_=--

--===============1714006351==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1714006351==--

Re: help with Win32::TieRegistry

am 28.08.2008 02:24:09 von Bill Luebkert

anthony.okusanya@usbank.com wrote:
>
> Greetings All
> I am having trouble using the Win32::TieRegistry's CreateKey method
> sample code is given below. It does not create the key.
> Im not sure what Im missing here.
>
> #========================================
> use Win32::TieRegistry (Delimiter => "/",
> SplitMultis => 1, AllowLoad => 1,
> qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ
> KEY_READ KEY_WRITE KEY_ALL_ACCESS ),
> );
>
> if($Registry->CreateKey("LMachine/SOFTWARE/TestKey")) {

Not sure why yours fails, but try it like this:

if($Registry->CreateKey("LMachine/SOFTWARE/TestKey", {})) {

> print "Reg Key created \n";
> }
> else {
> print "Failed to create key \n";
> }
>
> #========================================
>
> I can however create the key using (much easier syntax I know)
> $Registry->{"LMachine/SOFTWARE/TestKey"} = {};
>
> As always Thanks in Advance for your assistance
>
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: help with Win32::TieRegistry

am 28.08.2008 02:30:29 von anthony.okusanya

This is a multipart message in MIME format.
--===============0494779855==
Content-Type: multipart/alternative;
boundary="=_alternative 0002CABE862574B3_="

This is a multipart message in MIME format.
--=_alternative 0002CABE862574B3_=
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii

From:
Bill Luebkert
To:
anthony.okusanya@usbank.com
Cc:
ActivePerl@listserv.ActiveState.com
Date:
08/27/2008 07:24 PM
Subject:
Re: help with Win32::TieRegistry



anthony.okusanya@usbank.com wrote:
>
> Greetings All
> I am having trouble using the Win32::TieRegistry's CreateKey
method
> sample code is given below. It does not create the key.
> Im not sure what Im missing here.
>
> #========================================
> use Win32::TieRegistry (Delimiter => "/",
> SplitMultis => 1, AllowLoad => 1,
> qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ
> KEY_READ KEY_WRITE KEY_ALL_ACCESS ),
> );
>
> if($Registry->CreateKey("LMachine/SOFTWARE/TestKey")) {

Not sure why yours fails, but try it like this:

if($Registry->CreateKey("LMachine/SOFTWARE/TestKey", {})) {

> print "Reg Key created \n";
> }
> else {
> print "Failed to create key \n";
> }
>
> #========================================
>
> I can however create the key using (much easier syntax I know)
> $Registry->{"LMachine/SOFTWARE/TestKey"} = {};
>
> As always Thanks in Advance for your assistance
>


Thanks Bill I tried the empty {} and it still doesnt work on my machine
(perl 5.8.8)
if($Registry->CreateKey("LMachine/SOFTWARE/TestKey", {})) {

print "Reg Key created \n";
}
else {
print "Failed to create key \n";
}




U.S. BANCORP made the following annotations
------------------------------------------------------------ ---------
Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation.



------------------------------------------------------------ ---------


--=_alternative 0002CABE862574B3_=
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=us-ascii














From:
Bill Luebkert <dbecoll@roadrunner.com>
To:
anthony.okusanya@usbank.com
Cc:
ActivePerl@listserv.ActiveState.com
Date:
08/27/2008 07:24 PM
Subject:
Re: help with Win32::TieRegistry










anthony.okusanya@usbank.com wrote:

>

> Greetings All

>         I am having trouble using the Win32::TieRegistry's
CreateKey method

> sample code is given below. It does not create the key.

> Im not sure what Im missing here.

>

> #========================================

> use Win32::TieRegistry (Delimiter => "/",

>         SplitMultis => 1,  AllowLoad =>
1,

>         qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY
REG_MULTI_SZ

>             KEY_READ KEY_WRITE KEY_ALL_ACCESS
),

>     );

>

> if($Registry->CreateKey("LMachine/SOFTWARE/TestKey"))
{



Not sure why yours fails, but try it like this:



  if($Registry->CreateKey("LMachine/SOFTWARE/TestKey",
{})) {



>         print "Reg Key created \n";

> }

> else {

>         print "Failed to create key \n";

> }

>

> #========================================

>

> I can however create the key using (much easier syntax I know)

> $Registry->{"LMachine/SOFTWARE/TestKey"} = {};

>

> As always Thanks in Advance for your assistance

>





Thanks Bill I tried the empty {} and it still doesnt
work on my machine (perl 5.8.8)


if($Registry->CreateKey("LMachine/SOFTWARE/TestKey",
{})) {




        print "Reg
Key created \n";


}

else {

        print "Failed
to create key \n";


}








U.S. BANCORP made the following annotations
------------------------------------------------------------ ---------
Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation.



------------------------------------------------------------ ---------


--=_alternative 0002CABE862574B3_=--

--===============0494779855==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0494779855==--