A Registry Branch : Registry « Win32 « Perl






A Registry Branch

   


 use Win32::Registry;
 $| = 1;
 $key = "HARDWARE";
 $HKEY_LOCAL_MACHINE->Open($key, $nextKeyList);
 listKeys($nextKeyList);
 sub listKeys(){
    $count++;
    my ($keyList) = @_;
    my ($nextObj, @subKeys, $subKey);
    $keyList->GetKeys(\@subKeys);
    foreach $subKey (@subKeys){
       $tabString = "   " x $count;
       print "$tabString $subKey\n";
       $keyList->Open($subKey, $nextKeyList);
       listKeys($nextKeyList);
       $count--;
    }
    $keyList->Close();
 }

   
    
    
  








Related examples in the same category

1.New Registry Key Creation
2.Creates new key in the registry
3.Registry Key Deletion