I am using the latest version of inno that does the following during setup:
Step [4] creates the database and tables etc and only works if SQL Server has already been installed which is why it is done in Step [2].
The output directory contains the created setup.exe and I manually place the additional dependencies folder containing the files required for steps [1,2 and 4] mentioned above.
This works great but I would like to create a single exe only that includes all the dependencies and extracts the dependencies BEFORE wpReady
and before Step [1] above.
The dependencies are in the [Files]
section but these files are not extracted until the setup executes wpReady
message after the setup has gone through all the forms and attempts to install the files.
I use the following that adds what I need to the setup.exe
[Files]
Source: Output\Dependencies\*; DestDir: {tmp}; Flags: deleteafterinstall
What is the best way to extract the files to the temp directory before wpReady
or should I perform the actions of wpReady
first then go about installing the Dependencies (not ideal though).
You can use the ExtractTemporaryFile()
function in the PrepareToInstall
event function to extract any file from the [Files]
section to {tmp}
earlier, and it will be deleted when the setup finishes. Together with scripting and the various hooks Inno Setup gives you nearly everything can be achieved.
Have a look at the "Pascal Scripting" section of the Inno Setup help, specifically the "Support Functions Reference". There you will find documentation for ExtractTemporaryFile()
and more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With