Click here to Skip to main content
15,498,506 members
Articles / .NET / .NET6

Tagged as


413 bookmarked

Inno Setup Dependency Installer

Rate me:
Please Sign up or sign in to vote.
4.91/5 (177 votes)
5 Jan 2022CPOL2 min read
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


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 the Github repository.
  3. Open the extracted CodeDependencies.iss file.
  4. Comment out dependency defines to disable installing them in the example setup and leave only dependencies that need to be installed:
    • #define UseVC2013 <-- installed in example setup
      ;#define UseVC2013 <-- commented out and not installed in example setup
  5. Modify other sections like [Setup] [Files] [Icons] as necessary.
  6. Build setup using Inno Setup compiler.


You can include CodeDependencies.iss file into your setup by disabling compilation of the example setup before and calling the desired Dependency_Add functions:

#define public Dependency_NoExampleSetup
#include "CodeDependencies.iss"

; ...

function InitializeSetup: Boolean;
  // add the dependencies you need
  // ...

  Result := True;


You have two ways to distribute the dependency installers. By default, the dependency will be downloaded from the official website once it is defined as required in the CodeDependencies.iss file. Another way is to pack the dependency into a single executable setup like so:

  • Include the dependency setup file by defining the source:

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


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:

Dependency_ForceX86 := True; // force 32-bit install of next dependencies
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].


  • .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
    • .NET Core Runtime 3.1
    • ASP.NET Core Runtime 3.1
    • .NET Desktop Runtime 3.1
    • .NET Runtime 5.0
    • ASP.NET Core Runtime 5.0
    • .NET Desktop Runtime 5.0
    • .NET Runtime 6.0
    • ASP.NET Core Runtime 6.0
    • .NET Desktop Runtime 6.0
  • 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 2 Express
    • SQL Server 2017 Express
    • SQL Server 2019 Express
  • DirectX End-User Runtime


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

This article was originally posted at


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

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

Comments and Discussions

GeneralMessage Closed Pin
24-Jun-14 6:22
MemberDomGries24-Jun-14 6:22 
GeneralRe: VC Runtime 2012 Update 4 Pin
Brisingr Aerowing25-Jun-14 17:48
professionalBrisingr Aerowing25-Jun-14 17:48 
GeneralRe: VC Runtime 2012 Update 4 Pin
Vectorcorp24-Feb-15 14:13
MemberVectorcorp24-Feb-15 14:13 
SuggestionMy Vote Of 5 Pin
AnthoniG15-Jun-14 4:07
MemberAnthoniG15-Jun-14 4:07 
QuestionIs it free for commercial use ?? Pin
Tridip Bhattacharjee2-Jun-14 22:11
professionalTridip Bhattacharjee2-Jun-14 22:11 
QuestionThis might be useful Pin
Rinat Galyautdinov25-Sep-13 19:48
MemberRinat Galyautdinov25-Sep-13 19:48 
QuestionHow to install prerequisite without showing any dialog box Pin
gauravchandok20022-Aug-13 21:38
Membergauravchandok20022-Aug-13 21:38 
Question.NET 4 Full vs Client profile - which gets installed? Pin
nmg1963-Jun-13 2:51
Membernmg1963-Jun-13 2:51 
Does this script install the .NET Client Profile or the .NET 4 Full install?
I can't see where (or why) it chooses and the #define statement seems to encompass both.
QuestionSample is not working, windows installer and sql server is not installed in my PC. Pin
Member 870685915-May-13 19:02
MemberMember 870685915-May-13 19:02 
QuestionAbout define use_dotnetfx35 Pin
terra.jr8-May-13 5:02
Memberterra.jr8-May-13 5:02 
GeneralWhat are the steps to use this tool? Pin
Chaim Tovim7-May-13 11:47
MemberChaim Tovim7-May-13 11:47 
QuestionDependencies file name Pin
fandisus28-Feb-13 1:25
Memberfandisus28-Feb-13 1:25 
AnswerMessage Closed Pin
6-May-13 22:59
MemberDomGries6-May-13 22:59 
GeneralRe: Dependencies file name Pin
hairy_hats4-Sep-15 5:30
Memberhairy_hats4-Sep-15 5:30 
GeneralMy vote of 5 Pin
Nicolas Cornet6-Feb-13 23:35
MemberNicolas Cornet6-Feb-13 23:35 
QuestionWin 2008 R2 installation using the role manager Pin
torno22-Jan-13 5:47
Membertorno22-Jan-13 5:47 
AnswerRe: Win 2008 R2 installation using the role manager Pin
torno24-Jan-13 3:13
Membertorno24-Jan-13 3:13 
GeneralRe: Win 2008 R2 installation using the role manager Pin
Harald Binkle4-Apr-13 3:49
MemberHarald Binkle4-Apr-13 3:49 
GeneralRe: Win 2008 R2 installation using the role manager Pin
Freddyvdh15-Jan-14 6:22
MemberFreddyvdh15-Jan-14 6:22 
GeneralRe: Win 2008 R2 installation using the role manager Pin
Binkle@JAM15-Jan-14 22:05
MemberBinkle@JAM15-Jan-14 22:05 
QuestionI dont know this code "OutputBaseFilename={#MyAppSetupName}-{#MyAppVersion}" Pin
Sun-Mi Kang15-Jan-13 15:12
MemberSun-Mi Kang15-Jan-13 15:12 
AnswerRe: I dont know this code "OutputBaseFilename={#MyAppSetupName}-{#MyAppVersion}" Pin
Atlence24-May-13 2:06
MemberAtlence24-May-13 2:06 
GeneralMy vote of 5 Pin
Sun-Mi Kang15-Jan-13 15:01
MemberSun-Mi Kang15-Jan-13 15:01 
GeneralMy vote of 5 Pin
Felicia Santoro-Petti2-Jan-13 6:01
MemberFelicia Santoro-Petti2-Jan-13 6:01 
QuestionGoogle Chrome Installation Check Pin
kalpesh28041-Jan-13 20:14
Memberkalpesh28041-Jan-13 20:14 

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.