Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing an additional redistributable file with Inno Setup

Tags:

inno-setup

I am using Inno setup to install my tool together with some dlls. However, I need to run a microsoft redistributable .exe during my setup. How can embed it into the setup process?

like image 948
ISTB Avatar asked Oct 09 '12 13:10

ISTB


People also ask

What is an Inno Setup file?

Inno Setup is a free software script-driven installation system created in Delphi by Jordan Russell. The first version was released in 1997.

How do I use Inno installer?

Go to Menu, Project, then Compile to compile and create the setup file. This will create a complete installer. Run the Setup and your application will be installed correctly. Innosetup offers an awesome alternative to create great looking Installers for free.

What language does Inno Setup use?

Inno Setup's [Code] section uses Pascal (or Pascal Script to be more exact, thanks to TLama), likely because Inno Setup itself is written in Pascal Delphi.


1 Answers

If you want to install additional redistributables with your application, you can add them to the setup using a normal [Files] entry with the dontcopy flag.

You can then extract this during the PrepareToInstall event function using the ExtractTemporaryFile() function and run it using Exec().

This method will also allow you to check the exit code and prompt to reboot if required.

There are various related articles on the ISXKB wiki.

like image 164
Deanna Avatar answered Sep 28 '22 09:09

Deanna