Ok.. I got it the wrong way round!!! I'm new to registry hacks with perl
and I'm not really sure what I'm doing here. All I want to do is copy
the hive from LMachine\\Software\\gpass\\new gpass\\consulting room
extensions\\ to CUser\\Software\\gpass\\new gpass\\consulting room
extensions\\. The only code I have is:
use Win32::TieRegistry;
$Registry->{"CUser\\Software\\gpass\\new gpass\\consulting room
extensions\\"} = $Registry->{"LMachine\\Software\\gpass\\new
gpass\\consulting room extensions\\"};
When I run it I do not get any errors however it does not create
CUser\\Software\\gpass\\new gpass\\consulting room extensions\\. Do I
need to save/import $registry? Is there a simpler way of doing this? I
have read through the documentation but I'm finding it hard to understand.
Any help is very much appreciated.
Thanks and regards,
Ewen
Brian Raven wrote:
> Ewen Marshall <> wrote:
>
>> Hi Guys,
>>
>> I'm looking to copy a the values of a key from a Win2k or XP registry:
>>
>> HKEY_LOCAL_MACHINE\Software\gpass\new gpass\consulting room extensions
>>
>> to
>>
>> HKEY_CURRENT_USER\Software\gpass\new gpass\consulting room extensions
>>
>> I've tried using the following code with use Win32::TieRegistry;
>> $Registry->{"LMachine/Software/gpass/new gpass/consulting room
>> extensions/"} = $Registry->{"CUser/Software/gpass/new
>> gpass/consulting room extensions/"};
>>
>> but I get the error:
>>
>> No such root key (CUser/Software/gpass/new gpass/consulting room
>> extensions) at C:\consult.pl line 7
>>
>> When I export the reg key I get the following output:
>> Windows Registry Editor Version 5.00
>>
>> [HKEY_LOCAL_MACHINE\Software\gpass\new gpass\consulting room
>> extensions] "SCI"="GpassCre.WebCre" "PCTI1"="DME7_GpassAx.ctlGpassTab"
>> "CALM Reminder"="CALMRemind.CALMReminder"
>> "LabelTrace"="qTrace.qtLabelForm"
>>
>> Could someone please let me know where I'm going wrong.
>>
>
> It looks like you have the assignment statement the wrong way round. It
> certainly doesn't match your stated direction of copy.
>
> Also, just in case you haven't noticed, the "Storing Items" section of
> 'perldoc Win32::TieRegistry' say that all key elements in the
> destination path except the last one must already exist.
>
> HTH
>
>
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs