Click here to Skip to main content
15,888,521 members
Articles / Programming Languages / SQL

Inno Setup Dependency Installer

Rate me:
Please Sign up or sign in to vote.
4.91/5 (191 votes)
7 Aug 2023CPOL2 min read 1.7M   24.9K   427   392
Download and install any dependency such as .NET, Visual C++ or SQL Server during your application's installation!
In this article, you will see installation, usage, integration, details, and dependencies of Inno Setup Dependency Installer.

Inno Setup Dependency Installer

Introduction

Inno Setup Dependency Installer can download and install any dependency such as .NET, Visual C++ or SQL Server during your application's installation. In addition, it is easy to add your own dependencies as well.

Installation and Usage

  1. Download and install Inno Setup 6.2+.
  2. Download the script from here or from the Github repository.
  3. Open the extracted ExampleSetup.iss file.
  4. Comment out dependency function calls inside InitializeSetup function to disable installing them:
    • Pascal
      Dependency_AddVC2013;   // installed in example setup
      //Dependency_AddVC2013; // commented out and not installed in example setup
  5. Modify other sections like [Setup] [Files] [Icons] as necessary.
  6. Build the setup using Inno Setup compiler.

Integration

You can also just include CodeDependencies.iss file into your setup and call the desired Dependency_Add functions (some may need defining their exe file path before the include):

Pascal
#define public Dependency_Path_NetCoreCheck "dependencies\"

#include "CodeDependencies.iss"

[Setup]
; ...

[Code]
function InitializeSetup: Boolean;
begin
  // add the dependencies you need
  Dependency_AddDotNet70;
  // ...

  Result := True;
end;

Details

You have two ways to distribute the dependency installers. By default, most dependencies will be downloaded from the official website. Another way is to pack the dependency into a single executable setup like so:

  • Include the dependency setup file by defining the source:

    Pascal
    Source: "dxwebsetup.exe"; Flags: dontcopy noencryption
  • Call ExtractTemporaryFile() before the corresponding Dependency_Add function:

    Pascal
    ExtractTemporaryFile('dxwebsetup.exe');

The dependencies are installed based on the system architecture. If you want to install 32-bit dependencies on a 64-bit system, you can force 32-bit mode like so:

Pascal
Dependency_ForceX86 := True;  // force 32-bit install of next dependencies
Dependency_AddVC2013;
Dependency_ForceX86 := False; // disable forced 32-bit install again

If you only deploy 32-bit binaries and dependencies, you can also instead just not define ArchitecturesInstallIn64BitMode in [Setup].

Dependencies

  • .NET
    • .NET Framework 3.5 Service Pack 1
    • .NET Framework 4.0
    • .NET Framework 4.5.2
    • .NET Framework 4.6.2
    • .NET Framework 4.7.2
    • .NET Framework 4.8.1
    • .NET Core 3.1 (Runtime, ASP.NET, Desktop)
    • .NET 5.0 (Runtime, ASP.NET, Desktop)
    • .NET 6.0 (Runtime, ASP.NET, Desktop)
    • .NET 7.0 (Runtime, ASP.NET, Desktop)
  • C++
    • Visual C++ 2005 Service Pack 1 Redistributable
    • Visual C++ 2008 Service Pack 1 Redistributable
    • Visual C++ 2010 Service Pack 1 Redistributable
    • Visual C++ 2012 Update 4 Redistributable
    • Visual C++ 2013 Update 5 Redistributable
    • Visual C++ 2015-2022 Redistributable
  • SQL
    • SQL Server 2008 R2 Service Pack 2 Express
    • SQL Server 2012 Service Pack 4 Express
    • SQL Server 2014 Service Pack 3 Express
    • SQL Server 2016 Service Pack 3 Express
    • SQL Server 2017 Express
    • SQL Server 2019 Express
    • SQL Server 2022 Express
  • Access
    • Access Database Engine 2010
    • Access Database Engine 2016
  • DirectX End-User Runtime
  • WebView2 Runtime

Credits

Thanks to the community for sharing many fixes and improvements. To contribute, please create a pull request.

This article was originally posted at https://github.com/DomGries/InnoDependencyInstaller

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Unknown
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralRe: Looking for testers for next version! [important] Pin
GJSVB12326-Jul-11 8:03
GJSVB12326-Jul-11 8:03 
GeneralRe: Looking for testers for next version! [important] Pin
Andrzej Lenkowski9-Sep-11 8:14
Andrzej Lenkowski9-Sep-11 8:14 
BugRe: Looking for testers for next version! [important] Pin
yvisek20-Sep-11 6:39
yvisek20-Sep-11 6:39 
GeneralRe: Looking for testers for next version! [important] [modified] Pin
Member 865677418-Feb-12 7:07
Member 865677418-Feb-12 7:07 
GeneralUnknown identifier 'init' Pin
HEMICRO20-May-11 13:42
HEMICRO20-May-11 13:42 
GeneralUnderstanding AddProduct parameters Pin
Hrizip3-Apr-11 11:15
Hrizip3-Apr-11 11:15 
GeneralMy vote of 5 Pin
Rei Masi23-Feb-11 1:49
Rei Masi23-Feb-11 1:49 
GeneralDownload Page Does Not Support Unicode At All Pin
Peter Lee7-Feb-11 17:34
Peter Lee7-Feb-11 17:34 
Hi all,

I got problem. The download page does not Unicode at all. This issue can be reproduced by following the steps below:

0. On an Locale=English Windows XP machine.

1. Create a file scripts\isxdl\chinese.ini with all strings translated into Chinese
(I have tried encoding the file with Unicode, Chinese - CodePage 936, UTF-8, UTF-8 without signature)

2. Add "cn.isxdl_langfile=chinese.ini" to scripts\products.iss

3. Add chinese to [Languages] section in the MainSetup.iss script file

Current behavior:
=================
when the Setup is downloading the required dependency from the Internet (say .Net Framework 4.0), the download page cannot display Chinese characters at all.
However, if I test it on a Locale=Chinese WinXP machine, it displays the Chinese characters pretty well.

Expected behavior:
=================
Whatever the Locale is, the download page should always be able to display all Unicode characters.

My guess is the download module isxdl.dll does not support Unicode at all, because I found all other pages can display Chinese well.

Thanks. Any idea?

Peter
GeneralMy vote of 4 Pin
Ath_TonHu2-Jan-11 3:56
Ath_TonHu2-Jan-11 3:56 
General2011-01: Updated scripts available from my blog Pin
Ath_TonHu2-Jan-11 3:53
Ath_TonHu2-Jan-11 3:53 
GeneralCompatibility with Inno Setup 5.40 Pin
McoreD30-Dec-10 16:31
McoreD30-Dec-10 16:31 
GeneralRe: Compatibility with Inno Setup 5.40 Pin
joseph ni24-Jul-11 21:42
joseph ni24-Jul-11 21:42 
GeneralBug when using [Components] [modified] Pin
blaktro15-Dec-10 11:05
blaktro15-Dec-10 11:05 
GeneralRe: Bug when using [Components] Pin
blaktro16-Dec-10 2:16
blaktro16-Dec-10 2:16 
Generalshow intalling progress. Pin
pedpedo1-Dec-10 23:49
pedpedo1-Dec-10 23:49 
GeneralRe: show intalling progress. Pin
Peter Lee6-Feb-11 12:46
Peter Lee6-Feb-11 12:46 
QuestionInstall Service Pack 2 Pin
NoiadoX24-Nov-10 4:32
NoiadoX24-Nov-10 4:32 
GeneralFramework 4.0 Client french/english Pin
Pascal Hubert22-Nov-10 3:47
Pascal Hubert22-Nov-10 3:47 
QuestionIs there a way to run a procedure from an downloaded dependency ? Pin
daveaton21-Nov-10 3:15
daveaton21-Nov-10 3:15 
QuestionNew version? Pin
xagon25-Oct-10 9:02
xagon25-Oct-10 9:02 
AnswerRe: New version? [modified] , installation of Windows Image Component Pin
Remco Overman25-Oct-10 21:05
Remco Overman25-Oct-10 21:05 
GeneralRe: New version? [modified] , installation of Windows Image Component Pin
Denise Ding28-Feb-11 17:05
Denise Ding28-Feb-11 17:05 
QuestionOffline Installer Pin
Opachl17-Oct-10 10:44
Opachl17-Oct-10 10:44 
AnswerRe: Offline Installer Pin
Peter Lee5-Feb-11 19:44
Peter Lee5-Feb-11 19:44 
GeneralUrgent help:dotnetfx35, AlwaysRestart=yes not working Pin
vnareshprasad8-Oct-10 1:59
vnareshprasad8-Oct-10 1:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.