Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #10  
Antiguo 04-03-2013
teecweb teecweb is offline
Miembro
NULL
 
Registrado: feb 2013
Posts: 64
Poder: 14
teecweb Va por buen camino
Talking

Holas si ya funciono.gracias...pero quisiera hacer una consulta mas:

Una vez que ya recorrio bien los indices y recuperar los nombres de los check se procede a desistalar :
por ejemplo la lista que se recorre:
c:\Program Files\rcv1.1\
c:\Program Files\rcv1.2\



Código Delphi [-]
procedure ButtonOnClick(Sender: TObject);
var
  i: Integer;
  var path,FileName: String;
begin
  path := CheckListBox1.Items[i];
if MsgBox('Do you really want to delete ' + ExtractFileDir(path) + '?', mbConfirmation, MB_YESNO) = idYes then
  begin
  for i:= 0 to CheckListBox1.Items.Count -1 do
             //unistaler
             begin
              if DirExists(ExtractFileDir(path)) then 
              begin
               CheckListBox1.Checked[i]:=true; 
//Aqui me llega un path por ejemplo : c:\Program Files\rcv1.2\ ..y dentro hay un directorio llamado
//Desinstalar dentro de este directorio hay un 'unins000.exe' y shellexec lo ejecuta mediante el procedimeinto 'desistalarItem'
                  FileName:=ExtractFileDir(path)+'\Desinstalar\'+'unins000.exe';
                     desistalarItem(FileName); 
               end    
               else
                          MsgBox('no existe',mbInformation, MB_OK);             
end;
end;         
end;
//procedimiento para desistalacion los .exe existentes
***********Mi dificultad es cuando shellexec se ejecuta ya sea para una desistalacion correcta o incorrecta sale del bucle y vuelve a recorrer el bucle..y yo en realidad no necesito que salga del bucle sino que siga con el siguiente indice..



si algo fallo en la desistalacion sale el error y sino ejecuta normalmente y el bucle empieza denuevo
y cuando el bucle empieza denuevo ahi es mi dificultad porque necesito que normalmente siga el bucle y no salga de el
Código Delphi [-]
 procedure desistalarItem(const FileName: string);
 var
  ErrorCode: Integer;
                     begin
                     if not ShellExec('',FileName,'', '', SW_SHOW, ewNoWait, ErrorCode) then
                           begin
                           // handle failure if necessary
                            MsgBox('DeinitializeSetup:' #13#13 'Execution of ''' + FileName + ''' failed. ' + SysErrorMessage(ErrorCode) + '.', mbError, MB_OK);
                           end
                     end;

por favor si hay alguna suegerencia estare muy pendiente..gracias por sus respuestas
Responder Con Cita
 



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
Recorrer checkboxlist en pascal para un realizar en INNOSETUP teecweb Varios 1 02-03-2013 07:23:48
Agregar mas colores de fuente a Delphi candylolz OOP 5 07-08-2012 16:37:55
Agregar una linea en uses en delphi 10 piruchin Varios 3 11-04-2011 12:57:24
Agregar componente Delphi 8 elaprendizprog Impresión 4 20-03-2009 18:11:23
Agregar sonido en Delphi jescar .NET 2 17-09-2006 08:30:04


La franja horaria es GMT +2. Ahora son las 17:13:33.


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