function RegKeyExists(const RootKey: Integer; const SubKeyName: String): Boolean;
Returns True if the specified registry key exists.
begin if RegKeyExists(HKEY_AUTO, 'Software\Jordan Russell\Inno Setup') then begin // The key exists end; end;