Re: help with Win32::TieRegistry
by Bill Luebkert other posts by this author
Aug 27 2008 5:24PM messages near this date
help with Win32::TieRegistry
|
Re: help with Win32::TieRegistry
anthony.okusanya@[...].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@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Anthony Okusanya
Bill Luebkert
Anthony Okusanya
|