Subversion Repositories DevTools

Rev

Rev 5240 | Rev 5709 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5240 Rev 5264
Line 391... Line 391...
391
sub GetBeyondCompareExePath
391
sub GetBeyondCompareExePath
392
{
392
{
393
    eval "require Win32::TieRegistry"
393
    eval "require Win32::TieRegistry"
394
        or Error ("Win32::TieRegistry not available");
394
        or Error ("Win32::TieRegistry not available");
395
 
395
 
-
 
396
    Win32::TieRegistry::import(qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ KEY_READ KEY_WRITE KEY_ALL_ACCESS ));
-
 
397
 
396
    my $userKey= Win32::TieRegistry->new("CUser")
398
    my $userKey= Win32::TieRegistry->new("CUser", {Access=>KEY_READ(),Delimiter=>"/"})
397
        or  Error( "Can't access HKEY_CURRENT_USER key: $^E" );
399
        or  Error( "Can't access HKEY_CURRENT_USER key: $^E" );
398
 
400
 
399
    my $localKey= Win32::TieRegistry->new("LMachine")
401
    my $localKey= Win32::TieRegistry->new("LMachine", {Access=>KEY_READ(),Delimiter=>"/"})
400
        or  Error( "Can't access HKEY_LOCAL_MACHINE key: $^E" );
402
        or  Error( "Can't access HKEY_LOCAL_MACHINE key: $^E" );
401
 
403
 
402
    sub checkKeys
404
    sub checkKeys
403
    {
405
    {
404
        my ($userKey, $localKey, $key) = @_;
406
        my ($userKey, $localKey, $key) = @_;
405
        my ($bcKey, $DiffProg);
407
        my ($bcKey, $DiffProg);
406
        $bcKey = $userKey->Open( $key, {Delimiter=>"/"} );
408
        $bcKey = $userKey->Open( $key );
407
        if ($bcKey && ($DiffProg = $bcKey->GetValue( 'ExePath' )) )
409
        if ($bcKey && ($DiffProg = $bcKey->GetValue( 'ExePath' )) )
408
        {
410
        {
409
            return $DiffProg;
411
            return $DiffProg;
410
        }
412
        }
411
        $bcKey = $localKey->Open( $key, {Delimiter=>"/"} );
413
        $bcKey = $localKey->Open( $key );
412
        if ($bcKey && ($DiffProg = $bcKey->GetValue( 'ExePath' )) )
414
        if ($bcKey && ($DiffProg = $bcKey->GetValue( 'ExePath' )) )
413
        {
415
        {
414
            return $DiffProg;
416
            return $DiffProg;
415
        }
417
        }
416
        return undef;
418
        return undef;