michaell76 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, <\br> I need to create a simple Perl script to copy registry key locally.
I am running the following code:

#!/usr/bin/perl use Win32::Registry; $HKEY_CURRENT_USER->Create("SOFTWARE\\Test", $new_key); Win32::Registry::CopyKey("HKEY_CURRENT_USER\\SOFTWARE\\", $new_key);


And I getting the following error message:

Can't locate auto/Win32/Registry/CopyKey.al in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at 1.pl line 7

Please advice
Thanks
Michael

Replies are listed 'Best First'.
Re: copy registry key
by marto (Cardinal) on Dec 07, 2009 at 17:48 UTC
      Hi Martin,
      I found the method listed.
      Please see the link below:
      http://jenda.krynicky.cz/perl/Registry.pm.html#item_CopyKey

      Anyway, I will try Win32::TieRegistry

        Well this looks like a custom version of the module (as jenda states), did you install from CPAN and try to use this method? That isn't going to work. you'd need jendas version of the module.