Ver Mensaje Individual
  #3  
Antiguo 01-02-2005
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 29
Lepe Va por buen camino
En lugar de usar WinExec, yo usaba ShellExecute, porque puedes darles más parámetros, es decir, para esta función te pide:
Código Delphi [-]
  ShellExecute(Form1.Handle,
               'Open',
               'c:\uharc.exe','a -d1 -m3 "mi archivodestino".kkk',
               '"c:\Archivos de programa\uno"',
               SW_NORMAL);

function ShellExecute(hWnd: HWND; Operation, FileName, Parameters,
Directory: PChar; ShowCmd: Integer): HINST; stdcall;

Filename = archivo a ejecutar
Parameters = pues todos los parametros que lleva, los modificadores y los archivos de origen y destino (pasale la ruta completa entre comillas dobles como ya te han dicho)
Directory = directorio donde ejecutarlo
Showcmd mira en windows.pas
{ ShowWindow() Commands }
SW_HIDE = 0;
SW_SHOWNORMAL = 1;
SW_NORMAL = 1;
SW_SHOWMINIMIZED = 2;
SW_SHOWMAXIMIZED = 3;
SW_MAXIMIZE = 3;
SW_SHOWNOACTIVATE = 4;
SW_SHOW = 5;
SW_MINIMIZE = 6;
SW_SHOWMINNOACTIVE = 7;
SW_SHOWNA = 8;
SW_RESTORE = 9;
SW_SHOWDEFAULT = 10;
SW_MAX = 10;

Si haces una interfaz amigable para el uharc.exe, avisa, que es un compresor multimedia muy bueno .


Saludos
Responder Con Cita