View Single Post
  #310  
Old 10-06-2017, 06:08
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 715 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
Replace below function with the function here in this script
i am not gonna explain furthur details you have to answer it yoursef

Code:
function EXEC_UNPACK( const Exec , Option , inFiles, inDir : string; Deldest : boolean): boolean;
var
  ExecError :boolean;
  FindHandle1, ColFiles1, CurIndex1 : Integer;
  InFilePath, OutFilePath, OutFileName : PAnsiChar;
  temp : string;
  #ifdef ppx2
    Str : array of string;
    cmd : string;
    i : integer;
  #endif
begin
  FindHandle1:=ISFindFiles(0,inFiles,ColFiles1);
  ExecError:=false;
  #ifndef ppx2
    while not ExecError and ISPickFilename(FindHandle1,inDir,CurIndex1,DelDest) do
    begin
      temp := option;
      InFilePath:=ISGetName(0);
      OutFilePath:=ISGetName(1);
      OutFileName:=ISGetName(2);
      StringChangeEx(temp,'<infile>',InFilePath,true);
      StringChangeEx(temp,'<outfile>',OutFilePath,true);
      ExecError:=not ISExec(0, 0, 0, Exec,temp,ExpandConstant('{tmp}'),OutFileName,false);
    end;
  #else
    i := 1;
    CreateDir(ExpandConstant('{tmp}\Bat'));
    while not ExecError and ISPickFilename(FindHandle1,inDir,CurIndex1,false) do
    begin
      temp := option;
      InFilePath:=ISGetName(0);
      OutFilePath:=ISGetName(1);
      OutFileName:=ISGetName(2);
      StringChangeEx(temp,'<infile>',InFilePath,true);
      StringChangeEx(temp,'<outfile>',OutFilePath,true);
      Cmd := '"' + Exec + '" ' + temp;
      SaveStringToFile(ExpandConstant('{tmp}\bat\rest'+inttostr(i)+'.bat'),Cmd,False);
      i := i + 1;
      temp := '';
    end;
    if delDest then
      setArrayLength(Str,3)
    else
      setArrayLength(Str,2);
    Str[0] := 'title Restoring File';
    Str[1] := 'dir /b *rest*bat | "' + ExpandConstant('{tmp}\ppx2.exe') + '" -I {} -P %NUMBER_OF_PROCESSORS% -L 1 "{}"';
    if deldest then
      Str[3] := 'del /q /s  ' + inFiles ;
    SaveStringsToFile(ExpandConstant('{tmp}\Bat\Cmd_Master.bat'),Str,false);
    MsgBox('Wainting',mbInformation,mrOk);
    ExecError := not ISExec( 0, 0, 0, ExpandConstant('{tmp}\bat\Cmd_Master.bat'), '', ExpandConstant('{tmp}'), 'Restoring Files..',false) ; // Launches Batch File
    deltree(ExpandConstant('{tmp}\Bat'),true,true,true);
  #endif
  ISFindFree(FindHandle1);
  Result := ExecError;
end;
Reply With Quote
The Following User Says Thank You to Gupta For This Useful Post:
Andu21 (10-06-2017)