Question: I do not understand. There is a window registry key of firebird server I want to check if it exists. The key exists but the function returns false.
What is wrong? I'm using Windows 7 64x with delphi 2010.

Tks.
Davis.

```
procedure x;
  var
    reg:TRegistry;
begin

  reg := TRegistry.Create;
  reg.RootKey := HKEY_LOCAL_MACHINE;

  if reg.OpenKey('\SOFTWARE\Firebird Project\Firebird Server\Instances',false)=true then
  begin
    ShowMessage('Key exists');
  end;

end;

```

Answer: 
I think since you look at the registry from a 32 bit process on a 64 bit operating system, you are indeed looking at the "virtual" registry tree. In fact, an hidden "sub-redirection" is at work here.

See the [registry changes in x64-based versions of Windows Server 2003 and in Windows XP Professional x64 Edition](http://support.microsoft.com/kb/896459) at Microsoft.

> 
> 32-bit programs and 64-bit programs that are running on an x64-based
>  version of Windows operate in different modes and use the following
>  sections in the registry:
> 
> 
> Native mode 64-bit programs run in Native mode and access keys and
>  values that are stored in the following registry sub key:
> 
> 
> 
> ```
> HKEY_LOCAL_MACHINE\Software
> 
> ```
> 
> 32-bit programs run in WOW64 mode and access keys and values that are
>  stored in the following registry sub key:
> 
> 
> 
> ```
> HKEY_LOCAL_MACHINE\Software\WOW6432node
> 
> ```
> 
> 

(quoted from the Microsoft page above)

So if your firebird process installed the keys in 64 bit mode, they won't be visible from a 32 bit process. And you'll need a 32 bit FireBird client to let it work with Delphi (unless you are using Delphi XE2 64 Bit mode).
Try to run your application as administrator.
I think this will solve your problem.