Ver Mensaje Individual
  #14  
Antiguo 01-12-2016
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola.

En un parrafo de este enlace Testing your installation dice:
Cita:
If everything works as designed, the Firebird server process will be running on your server upon completion of the installation. It will start up automatically whenever you restart your server.
por lo que controlando los puntos anteriores debería bastar. (creo que algo similar ya comentaste en un mensaje anterior)

Algo que se me ocurre para verificar si existe alguna versión de Firebird instalada es revisar si el nombre existe en la lista de programas instalados, ejemplo:
Código PHP:
...
#include <registry.hpp>

bool isFirebirdInstalled()
{
  
AnsiString CKEY "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
  
TRegistry   *rg = new TRegistry;
  
TStringList *ts = new TStringList;
  
bool found false;

  
rg->RootKey HKEY_LOCAL_MACHINE;
  if( 
rg->OpenKeyReadOnlyCKEY ) )
    
rg->GetKeyNamests );
  
rg->CloseKey();

  for ( 
int i 0ts->Count && !foundi++ ) {
    
rg->RootKey HKEY_LOCAL_MACHINE;
    
rg->OpenKeyReadOnlyCKEY '\\'ts->Strings[i] );
    
AnsiString str rg->ReadString"DisplayName" );
    
found str.Pos"Firebird" ) != 0;
    
rg->CloseKey();
  }

  
delete rg;
  
delete ts;
  return 
found;
}

void __fastcall TForm1::Button1ClickTObject *Sender )
{
  if ( 
isFirebirdInstalled() )
    
ShowMessage"Instalado" );
  else
    
ShowMessage"No instalado" );

Saludos
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....

Última edición por ecfisa fecha: 02-12-2016 a las 02:40:35.
Responder Con Cita