help with Win32::TieRegistry
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
<br><font size=2 face="sans-serif">Greetings All</font>
<br><font size=2 face="sans-serif"> I
am having trouble using the Win32::TieRegistry's CreateKey method</font>
<br><font size=2 face="sans-serif">sample code is given below. It does
not create the key.</font>
<br><font size=2 face="sans-serif">Im not sure what Im missing here.</font>
<br>
<br><font size=2 face="sans-serif">#========================================</font>
<br><font size=2 face="sans-serif">use Win32::TieRegistry (Delimiter =>
"/",</font>
<br><font size=2 face="sans-serif"> SplitMultis
=> 1, AllowLoad => 1,</font>
<br><font size=2 face="sans-serif"> qw( REG_SZ
REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ</font>
<br><font size=2 face="sans-serif">
KEY_READ KEY_WRITE KEY_ALL_ACCESS ),</font>
<br><font size=2 face="sans-serif"> );</font>
<br>
<br><font size=2 face="sans-serif">if($Registry->CreateKey("LMachine/SOFTWARE/TestKey"))
{</font>
<br><font size=2 face="sans-serif"> print
"Reg Key created \n";</font>
<br><font size=2 face="sans-serif">}</font>
<br><font size=2 face="sans-serif">else {</font>
<br><font size=2 face="sans-serif"> print
"Failed to create key \n";</font>
<br><font size=2 face="sans-serif">}<br>
<br>
#========================================</font>
<br>
<br><font size=2 face="sans-serif">I can however create the key using (much
easier syntax I know)</font>
<br><font size=2 face="sans-serif">$Registry->{"LMachine/SOFTWARE/TestKey"}
= {};</font>
<br><font size=2 face="sans-serif"><br>
As always Thanks in Advance for your assistance</font>
<br>
<br><font size=2 face="sans-serif"><br>
Tony B. Okusanya<br>
"Live Life By Design And Not From Crisis to Crisis"</font>
<P>U.S. BANCORP made the following annotations<br/> ------------------------------------------------------------ ---------<br/><font face="Arial" size=2>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.</font><br>
<br>
------------------------------------------------------------ ---------<br/>
</P>
--=_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 [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1714006351==--
Re: help with Win32::TieRegistry
anthony.okusanya [at] 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 [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: help with Win32::TieRegistry
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 <dbecoll [at] roadrunner.com>
To:
anthony.okusanya [at] usbank.com
Cc:
ActivePerl [at] listserv.ActiveState.com
Date:
08/27/2008 07:24 PM
Subject:
Re: help with Win32::TieRegistry
anthony.okusanya [at] 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
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Bill Luebkert <dbecoll [at] roadrunner.com></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">anthony.okusanya [at] usbank.com</font>
<tr>
<td valign=top><font size=1 color=#5f5f5f face="sans-serif">Cc:</font>
<td><font size=1 face="sans-serif">ActivePerl [at] listserv.ActiveState.com</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">08/27/2008 07:24 PM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Re: help with Win32::TieRegistry</font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>anthony.okusanya [at] usbank.com wrote:<br>
> <br>
> Greetings All<br>
> I am having trouble using the Win32::TieRegistry's
CreateKey method<br>
> sample code is given below. It does not create the key.<br>
> Im not sure what Im missing here.<br>
> <br>
> #========================================<br>
> use Win32::TieRegistry (Delimiter => "/",<br>
> SplitMultis => 1, AllowLoad =>
1,<br>
> qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY
REG_MULTI_SZ<br>
> KEY_READ KEY_WRITE KEY_ALL_ACCESS
),<br>
> );<br>
> <br>
> if($Registry->CreateKey("LMachine/SOFTWARE/TestKey"))
{<br>
<br>
Not sure why yours fails, but try it like this:<br>
<br>
if($Registry->CreateKey("LMachine/SOFTWARE/TestKey",
{})) {<br>
<br>
> print "Reg Key created \n";<br>
> }<br>
> else {<br>
> print "Failed to create key \n";<br>
> }<br>
> <br>
> #========================================<br>
> <br>
> I can however create the key using (much easier syntax I know)<br>
> $Registry->{"LMachine/SOFTWARE/TestKey"} = {};<br>
> <br>
> As always Thanks in Advance for your assistance<br>
> <br>
</font></tt>
<br>
<br><tt><font size=2>Thanks Bill I tried the empty {} and it still doesnt
work on my machine (perl 5.8.8)</font></tt>
<br><tt><font size=2>if($Registry->CreateKey("LMachine/SOFTWARE/TestKey",
{})) {</font></tt>
<br>
<br><tt><font size=2> print "Reg
Key created \n";</font></tt>
<br><tt><font size=2>}</font></tt>
<br><tt><font size=2>else {</font></tt>
<br><tt><font size=2> print "Failed
to create key \n";</font></tt>
<br><tt><font size=2>}</font></tt>
<br><tt><font size=2><br>
</font></tt>
<br>
<br>
<P>U.S. BANCORP made the following annotations<br/> ------------------------------------------------------------ ---------<br/><font face="Arial" size=2>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.</font><br>
<br>
------------------------------------------------------------ ---------<br/>
</P>
--=_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 [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0494779855==--