Ver Mensaje Individual
  #2  
Antiguo 07-05-2012
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Reputación: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

Prueba a usar rutas absolutas en lugar de rutas relativas. Más o menos algo como esto:

Código Delphi [-]
var
  exePath : string;
  rootDir : string;
begin
  // Ruta del directorio de nuestra aplicación
  rootDir := ExtractFilePath( ParamStr( 0 ) );

  // Ruta del ejecutable de "Enemy-Territory"
  exePath := rootDir + 'Instaladores\Enemy-Territory.exe';

  if FileExists( exePath ) then
  begin
    ShellExecute
    (
      Self.Handle,
      'open',
      PChar( exePath ),
      nil,
      nil,
      SW_SHOWNORMAL
    );
  end
  else
  begin
    raise EInOutError.CreateFmt
    (
      'El ejecutable "%s" no está donde debe',
      [ exePath ]
    );
  end;
end;
Responder Con Cita