Checking the registry

This code successfully checks for Acrobat Reader 3.0 on my system.
I am sure that the registry keys are different for other versions. I
guess
you would have to check for each version???

procedure TForm1.Button4Click(Sender: TObject);
Var aReg : TRegistry;
begin
     aReg := TRegistry.Create;

     aReg.RootKey := HKEY_LOCAL_MACHINE;
     if aReg.KeyExists('\SOFTWARE\Adobe\Acrobat Reader 3.0') then
        MessageDlg('Acrobat Reader 3.0
installed!',mtInformation,[mbOk],0)
     else
        MessageDlg('Acrobat Reader 3.0 not
installed!',mtInformation,[mbOk],0);

     aReg.Free;
end;

HTH,
Scott

Quote
paul kane wrote in message

<733m57$ns...@nclient3-gui.server.ntli.net>...
Quote
>I am trying to check the registry to find out if acrobat is
installed.
>Here is the code I have made

>var
>rootkey,openkey,valueexists:integer;
>reg:tregistry;
>begin
>Reg:=TRegistry.create;
>reg.RootKey:=HKEY_local_machine;
>{reg.OpenKey('\Software\adobe\acrobat', False);}
>if reg.ValueExists('acrobat') then
>regexist.caption := 'present'
>else
>regexist.caption := 'not present';

>reg.free;

>I have never worked with the registry before and any help or code
would be
>most appreciated

>Paul Kane