Ver Mensaje Individual
  #5  
Antiguo 13-03-2005
Avatar de Pablo Carlos
Pablo Carlos Pablo Carlos is offline
Miembro
 
Registrado: jun 2004
Ubicación: Mendoza - Argentina
Posts: 270
Reputación: 20
Pablo Carlos Va por buen camino
Prometido y cumplo...
De esta manera ejecuto e instalo los .CAB

Código Delphi [-]
procedure TfrmPath.InstalarAgente;
  procedure RunAndWaitShell(Ejecutable,
                            Argumentos:string
                            ;Visibilidad:integer);
  var
     Info:TShellExecuteInfo;
     pInfo:PShellExecuteInfo;
     exitCodeWord;
begin
     pInfo:=@Info;
     with Info do
     begin
      cbSize:=SizeOf(Info);
      fMask:=SEE_MASK_NOCLOSEPROCESS;
      wnd:=Handle;
      lpVerb:=nil;
      lpFile:=PChar(Ejecutable);
      lpParameters:=Pchar(Argumentos+#0);
      lpDirectory:=nil;
      nShow:=Visibilidad;
      hInstApp:=0;
     end;
     ShellExecuteEx(pInfo);
     repeat
      exitCode := WaitForSingleObject(Info.hProcess,500);
      Application.ProcessMessages;
     until (exitCode <> WAIT_TIMEOUT);
  end;
begin
  RunAndWaitShell('c:\Genie','', Sw_ShowNormal);
  RunAndWaitShell('c:\MSagent','', Sw_ShowNormal);
end;

Gracias a todos los que respondieron
Saludos bye
__________________
Por qué todas las personas saben exactamente cómo debemos vivir nuestra vida, y nunca tienen idea de cómo deben vivir sus propias vidas.
Responder Con Cita