function HasSetupSQL: Boolean;
var
TmpReg: Tregistry;
begin
Result := False;
TmpReg := Tregistry.Create;
try
try
TmpReg.RootKey := HKEY_LOCAL_MACHINE;
if not TmpReg.OpenKey('Software/Microsoft/MSSQLServer/Setup', False) then
abort;
Result := TmpReg.ReadString('SQLPath') <> '';
TmpReg.CloseKey;
except
Result := False;
end;
finally
TmpReg.Free;
end;
end;