views:

1086

answers:

1

Hi,

I am using the latest version of inno that does the following during setup:

[1] Perform dependency check to see what is installed
[2] Installs dependencies that are not already installed (.net, sql server, directx etc)
[3] Install the application and the files from the [Files] section (wpReady)
[4] Checks SQL Server for previously installed database and creates / updates the tables etc

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).

Thanks

+4  A: 

You can use the ExtractTemporaryFile() function to extract any file from the [Files] section 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.

mghie
excellent thanks. Can't believe I missed this function!
Belliez