use strict; use Win32::TieRegistry; my $newSubKey='TEMPHIVE'; my $thefile = 'C://Documents and Settings//DefaultUser//ntuser.dat'; # Specify Hive my $key= $Registry->{ 'HKEY_USERS' }; # Allow access to load hives my $optValue = 'true'; my $oldOpts= $key->SetOptions( AllowLoad=>$optValue ); # Load the hive my $newKey = $key->Load( $thefile, $newSubKey ); print $^E; #prints error description, if any. # GetValues in TEMPHIVE my $key = $Registry->{ 'HKEY_USERS\TEMPHIVE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' }; my $sValueName ='TEST'; my $ValueData = $key->GetValue( $sValueName ); print "\n $ValueData \n"; #prints value of TEST from loaded hive