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->OpenKeyReadOnly( CKEY ) )
rg->GetKeyNames( ts );
rg->CloseKey();
for ( int i = 0; i < ts->Count && !found; i++ ) {
rg->RootKey = HKEY_LOCAL_MACHINE;
rg->OpenKeyReadOnly( CKEY + '\\'+ ts->Strings[i] );
AnsiString str = rg->ReadString( "DisplayName" );
found = str.Pos( "Firebird" ) != 0;
rg->CloseKey();
}
delete rg;
delete ts;
return found;
}
void __fastcall TForm1::Button1Click( TObject *Sender )
{
if ( isFirebirdInstalled() )
ShowMessage( "Instalado" );
else
ShowMessage( "No instalado" );
}
Saludos