Creates new key in the registry : Registry « Win32 « Perl






Creates new key in the registry

  


#!/usr/bin/perl -w

use Win32::Registry;

$key_name = "SOFTWARE\\YourKey";

$status = $HKEY_LOCAL_MACHINE->Create( $key_name, $keyobj );

if ($status) {

    $keyobj->SetValueEx( 'Value',  # Name
        0,        # Reserved. 
        REG_SZ,   # Type
        'Comments' );


    $keyobj->Close();
}

   
    
  








Related examples in the same category

1.New Registry Key Creation
2.A Registry Branch
3.Registry Key Deletion