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.
- Download and install Inno Setup 6.4+.
- Download this repository or clone it.
- Open the extracted ExampleSetup.iss file.
- Comment out dependency function calls inside InitializeSetup function to disable installing them:
Dependency_AddVC2013; // installed in example setup //Dependency_AddVC2013; // commented out and not installed in example setup
- Modify other sections like [Setup] [Files] [Icons] as necessary.
- Build the setup using Inno Setup compiler.
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):
#include "CodeDependencies.iss"
[Setup]
; ...
[Code]
function InitializeSetup: Boolean;
begin
// add the dependencies you need
Dependency_AddDotNet90;
// ...
Result := True;
end;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:
Source: "dxwebsetup.exe"; Flags: dontcopy noencryption
-
Call ExtractTemporaryFile() before the corresponding Dependency_Add function
ExtractTemporaryFile('dxwebsetup.exe');
The dependencies are installed based on the system architecture (x86, x64, or ARM64). 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_AddVC2013;
Dependency_ForceX86 := False; // disable forced 32-bit install againA similar version exists for forcing 64-bit on arm.
If you only deploy 32-bit binaries and dependencies you can also instead just not define ArchitecturesInstallIn64BitMode in [Setup].
By default all added dependencies are installed for every user. You can tie them to one or more components so they are only downloaded and installed when the matching components are selected:
Dependency_Components := 'advanced'; // only install next dependencies if the 'advanced' component is selected
Dependency_AddDotNet100;
Dependency_Components := ''; // disable component gating againDependency_Components accepts the same expression syntax as Inno's Components parameter (e.g. 'feature1 or feature2').
- .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 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)
- .NET 8.0.26 (Runtime, ASP.NET, Desktop)
- .NET 9.0.15 (Runtime, ASP.NET, Desktop)
- .NET 10.0.7 (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
- SQL Server 2025 Express
- Access
- Access Database Engine 2016
- DirectX End-User Runtime
- WebView2 Runtime
Thanks to the community for sharing many fixes and improvements. To contribute please create a pull request.
