function RegValueExists(const RootKey: Integer; const SubKeyName, ValueName: String): Boolean;
Returns True if the specified registry key and value exist.
begin if RegValueExists(HKEY_CURRENT_USER, 'Console', 'WindowSize') then begin // The value exists end; end;