View Single Post
  #15  
Old 02-03-2020, 02:55
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 342
Thanks: 271
Thanked 1,054 Times in 241 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by ADMIRAL View Post
Sorry, Mr. BlackFire69
I wrote a Script project and compressed it into data.cab and then mistakenly deleted the script file and I don't know how to get it.
what should I do now? There is a way to extract data.cab.
yes.

Code:
[Files]
Source: "pckr.dll"; Flags: dontcopy;

{Code]
var Init: Boolean;

function PInit(const Name, Password: PAnsiChar; Debug: Boolean):Boolean;
  external '[email protected]{tmp}\pckr.dll stdcall delayload';
procedure PExtractFile(const FName, Dest: PAnsiChar);
  external '[email protected]{tmp}\pckr.dll stdcall delayload';

function InitializeSetup(): Boolean;
var
  S:string;
begin
  S:=ExpandConstant('{src}');
  ExtractTemporaryFile('pckr.dll');
  Init:=PInit(S+'\Data.cab','PASSWORD',True);
  if Init then begin
  PExtractFile('Script.iss',S+'\Script_EXTRACTED.iss');
  end;

  if FileExists(S+'\Script_EXTRACTED.iss') then MsgBox('Script.iss extracted.',mbInformation,MB_OK);
  Result:=False;
end;
copy data.cab to Output folder and try. (Requires the password which you used)
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
ADMIRAL (03-03-2020), Harsh ojha (02-03-2020)