Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > API de Windows
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

 
 
Herramientas Buscar en Tema Desplegado
  #5  
Antiguo 15-06-2007
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Poder: 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
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

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
Terminar con Procedures. alexxino Varios 3 28-01-2007 22:40:57
Terminar la ejecucion rex Varios 5 30-05-2006 03:55:09
Terminar Thread coulthard Internet 3 28-11-2004 22:05:08
Mi aplicacion no puede terminar King Varios 0 08-06-2004 09:24:48
Forzar a terminar a una aplicacion diegofhernando Varios 1 12-08-2003 00:47:40


La franja horaria es GMT +2. Ahora son las 04:19:50.


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