Ver Mensaje Individual
  #6  
Antiguo 16-11-2011
jonydread jonydread is offline
Miembro
NULL
 
Registrado: nov 2011
Posts: 157
Reputación: 15
jonydread Va por buen camino
es lo mismo por lo que se reemplaze pero el enredo lo tenia yo jaj gracias ay funciono de pelos!!
Código Delphi [-]
procedure TReg2infConverter.Button2Click(Sender: TObject);
var Origen, Destino,FileName: string;
begin
FileName := Extractfilename(Opendialog1.FileName);
Origen := GetshortName(Opendialog1.FileName);
FileName:= AnsiReplaceStr(FileName,' ','');
Destino :=ChangeFileExt(FileName, '.inf');
 LlamarReg2inf(Handle,'REG2INF.EXE',Origen,Destino );
end;
la otra consulta que ise puse el codigo hintance para comprobar shellexecute
lo coloque aqui
Código Delphi [-]
procedure TReg2infConverter.LlamarReg2inf(Hnd: THandle; const App:string; const Origen: string; const Destino: string);
var
 HINSTANCE: Integer;
  ErrorMSG: string;
begin
   HINSTANCE:=ShellExecute(Hnd,
              'OPEN',
              PChar(ExtractFileName(App)),
              PChar(Origen+' '+Destino),
              PChar(GetShortName(ExtractFilePath(App))),
              SW_HIDE);
                if HINSTANCE < 32 then
      begin
        case HINSTANCE of
          0: ErrorMSG:= 'Memoria o recursos insuficientes';
          ERROR_FILE_NOT_FOUND: ErrorMSG:= 'Archivo no encontrado';
          ERROR_PATH_NOT_FOUND: ErrorMSG:= 'Ruta no encontrada';
          SE_ERR_ACCESSDENIED:  ErrorMSG:= 'Acceso denegado';
          //...
        end;
        MessageBox(Handle, PChar(ErrorMSG), 'ERROR', MB_ICONERROR + MB_OK);
        Application.Terminate;
       end;
end;
pero no funciono
Responder Con Cita