Quote:
Originally Posted by ADMIRAL
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 'PInit@{tmp}\pckr.dll stdcall delayload';
procedure PExtractFile(const FName, Dest: PAnsiChar);
external 'PExtractFile@{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)