Ver Mensaje Individual
  #5  
Antiguo 15-06-2007
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 22
cHackAll Va por buen camino
Cool EPA... super!

Me agrada que hagas tu propio instalador... el problema es sencillo, lo solucionas con una linea. te dejo tu mismo codigo, me tome la libertad de modificarlo un poquito pues habian algunas cosillas innecesarias desde mi punto de vista. En todo caso si no te funciona por algun motivo el nombre de la API que te interesa es WaitForSingleObject;

Código Delphi [-]
    FillChar(startinfo, sizeof(TStartupInfo), 0);
    startinfo.cb := sizeof(TStartupInfo);
    if creabd.Checked then
      if CreateProcess(nil, PChar(FInstalacion.dircd.Text+'\mysql_odbc\CreaBase.exe '+base+' root sqlpr65'), nil, nil, false, CREATE_DEFAULT_ERROR_MODE + NORMAL_PRIORITY_CLASS, nil, nil, startinfo, proc_info) then
      begin
        WaitForSingleObject(proc_info.hProcess, INFINITE);
        Timer1.Enabled := True
      end
      else
        Application.MessageBox('No se pudo ejecutar la base de datos', 'Error', MB_ICONEXCLAMATION);
    if not FileExists(FInstalacion.dircd.Text+'\instalar\CreaSistema.exe') then
      Application.MessageBox('No se encontro el sistema de instalacion','Error', MB_ICONEXCLAMATION)
    else
      if CreateProcess(nil, PChar(FInstalacion.dircd.Text+'\instalar\CreaSistema.exe'), nil, nil, false, CREATE_DEFAULT_ERROR_MODE + NORMAL_PRIORITY_CLASS, nil, nil, startinfo, proc_info) then
        Timer1.Enabled := True
      else
        Application.MessageBox('No se pudo ejecutar el sistema instalador', 'Error', MB_ICONEXCLAMATION);

PD: No se para que usas el TTimer, pero espero no afecte.

Saludos!
Responder Con Cita