Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #8  
Antiguo 22-11-2006
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Poder: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Cita:
Empezado por seoane
¿Y ahora que Roman?
Se me ocurre que podríamos hacerlo vía el registro:

Código Delphi [-]
{
  Obtiene las versiones del servidor MySQL que estén instaladas en el sistema
}
procedure GetMySqlInstalledServers(Versions: TStrings);
const
  hkMySql = '\SOFTWARE\MySQL AB\';

var
  Registry: TRegistry;
  KeyNames: TStringList;
  I: Integer;

begin
  Registry := TRegistry.Create;
  KeyNames := TStringList.Create;

  try
    Registry.RootKey := HKEY_LOCAL_MACHINE;

    if Registry.KeyExists(hkMySql) then
    begin
      Registry.OpenKeyReadOnly(hkMySql);
      Registry.GetKeyNames(KeyNames);

      for I := 0 to Pred(KeyNames.Count) do
        if AnsiStartsStr('mysql server', LowerCase(KeyNames[i])) then
        begin
          Registry.CloseKey;
          Registry.OpenKeyReadOnly(hkMySql + KeyNames[i]);
          Versions.Add(Registry.ReadString('Version'));
          Registry.CloseKey;

          Registry.OpenKeyReadOnly(hkMySql);
        end;

      Registry.CloseKey;
    end;
  finally
    Registry.Free;
    KeyNames.Free;
  end;
end;

// Saludos
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
saber si esta php instalado coulthard Internet 4 20-04-2006 19:56:43
Saber si un puerto está en uso Sr_Sombrero Internet 2 06-04-2006 15:26:38
Saber si una unidad de Red esta conectada comba API de Windows 2 18-04-2005 19:57:02
Saber si un formulario ya está creado o no. Tecnic2 OOP 2 27-09-2004 13:27:01
Saber si esta conectado Kaesbu Internet 1 22-09-2003 14:09:45


La franja horaria es GMT +2. Ahora son las 20:23:12.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi