1

My setup downloads a file called launcher.zip to the {tmp} folder and during and after installation it runs the following scripts:

[Files]
Source: "{tmp}\launchers\Launcher"; DestDir: "{app}"; Flags: onlyifdoesntexist recursesubdirs external;

[Run]
Filename: "{tmp}\7zip\7za.exe"; Parameters: "x ""{tmp}\launchers\launcher.zip"" -o""{tmp}\launchers"" * -r -aoa"; Flags: runhidden runascurrentuser;

But this way the [Files] section runs before the [Run] section so it doesn't find the folder extracted to the {tmp} folder.

I could just make the [Run] script extract to the destination folder, but I want to use the [Files] section to set the Flags: onlyifdoesntexist

Because I don't want it to replace files when extracting, unless a specific Component is selected, which in this case is launchers\reinstall (Another script removes the files if Component is selected)

So I need the [Run] section script to be executed before the [Files] section

Is there any way to do this?

1 Answers1

0

Instead of running a [Run] section, I ran a [Codes] section to extract, and added a BeforeInstall to my [Files] section

My answer here: Extract file during installation