Click here to Skip to main content
13,903,016 members
Click here to Skip to main content
Add your own
alternative version


334 bookmarked
Posted 13 Oct 2007
Licenced CPOL

Modular InnoSetup Dependency Installer

, 25 Oct 2017
Rate this:
Please Sign up or sign in to vote.
A modular InnoSetup script to download and install all available .NET Framework versions and much more

Screenshot - dotnetfx_installer1.jpg

Screenshot - dotnetfx_installer3.jpg


This article contains a modular InnoSetup install script that downloads (if setup files don't exist locally) and installs various dependencies like .NET Framework 1.1/2.0/3.5/4.0/4.5/4.6/4.7 or C++ Redistributable 2005/2008/2010/2012/2013/2015/2017 on 32-bit and 64-bit Windows.


The source code is written modular and is structured like this:

Screenshot - dotnetfx_structure.jpg

  • setup.iss - contains the basic setup where you include the modules (products) you need. They need to be included at the top like #include "scripts\products\dotnetfx11.iss" and then you only have to call their main function inside the [Code] part like dotnetfx11();
  • bin - contains the final output of the installer
  • src - contains the application files of your program
  • scripts
    • products.iss - contains the shared code for the product scripts
    • products.pas - contains the actual code of products.iss
    • isxdl - contains the downloader DLL for the setup (if there is something to download) and its language files (e.g. german.ini). This is the place where you can put your language files for the isxdl downloader in.
    • products - contains the scripts for products which are required by the application (e.g. .NET Framework 2.0)
      • directxruntime.iss - DirectX End-User Runtime
      • dotnetfx11.iss - .NET Framework 1.1
      • dotnetfx11lp.iss - .NET Framework 1.1 Language Pack
      • dotnetfx11sp1.iss - .NET Framework 1.1 + Service Pack 1
      • dotnetfx20.iss - .NET Framework 2.0
      • dotnetfx20lp.iss - .NET Framework 2.0 Language Pack
      • dotnetfx20sp1.iss - .NET Framework 2.0 + Service Pack 1
      • dotnetfx20sp1lp.iss - .NET Framework 2.0 Service Pack 1 Language Pack
      • dotnetfx20sp2.iss - .NET Framework 2.0 + Service Pack 2
      • dotnetfx20sp2lp.iss - .NET Framework 2.0 Service Pack 2 Language Pack
      • dotnetfx35.iss - .NET Framework 3.5
      • dotnetfx35lp.iss - .NET Framework 3.5 Language Pack
      • dotnetfx35sp1.iss - .NET Framework 3.5 + Service Pack 1
      • dotnetfx35sp1lp.iss - .NET Framework 3.5 Service Pack 1 Language Pack
      • dotnetfx40client.iss - .NET Framework 4.0 Client Profile
      • dotnetfx40full.iss - .NET Framework 4.0 Full
      • dotnetfx45.iss - .NET Framework 4.5.2
      • dotnetfx46.iss - .NET Framework 4.6.2
      • dotnetfx47.iss - .NET Framework 4.7
      • ie6.iss - Internet Explorer 6
      • iis.iss - Internet Information Services (just a check if it is installed)
      • jet4sp8.iss - Jet 4 + Service Pack 8
      • kb835732.iss - Security Update (KB835732) which is required by .NET Framework 2.0 Service Pack 1 on Windows 2000 Service Pack 4
      • mdac28.iss - Microsoft Data Access Components (MDAC) 2.8
      • msi20.iss - Windows Installer 2.0
      • msi31.iss - Windows Installer 3.1
      • msi45.iss - Windows Installer 4.5
      • sql2005express.iss - SQL Server 2005 Express + Service Pack 3
      • sql2008express.iss - SQL Server 2008 Express R2
      • sqlcompact35sp2.iss - SQL Server Compact 3.5 + Service Pack 2
      • vcredist2005.iss - Visual C++ 2005 Redistributable
      • vcredist2008.iss - Visual C++ 2008 Redistributable
      • vcredist2010.iss - Visual C++ 2010 Redistributable
      • vcredist2012.iss - Visual C++ 2012 Redistributable
      • vcredist2013.iss - Visual C++ 2013 Redistributable
      • vcredist2015.iss - Visual C++ 2015 Redistributable
      • vcredist2017.iss - Visual C++ 2017 Redistributable
      • wic.iss - Windows Imaging Component
      • winversion.iss - helper functions to determine the installed Windows version
      • fileversion.iss - helper functions to determine the version of a file
      • stringversion.iss - helper functions to correctly parse a version string
      • dotnetfxversion.iss - helper functions to determine the installed .NET Framework version including service packs
      • msiproduct.iss - helper functions to check for installed msi products

Most of the time you need to tweak the setup.iss because of different Windows version checks and inclusion of your required dependencies.

If a dependency (product) is not installed, the script checks if the product's setup exists inside the dependencies directory which is configurable in products.iss. By default it is: .\MyProgramDependencies. If they don't exist there, it tries to download them (except for Windows service packs). This means a support for offline installing via CD or DVD is also possible. You can also package all dependency installers into the final setup.exe getting rid of external directories (for an example see directxruntime.iss).

Screenshot - dotnetfx_installer2.jpg

Screenshot - dotnetfx_installer4.jpg

The installation routine of the dependencies is automatic, and they run in quiet or semi quiet mode. Therefore no user interaction is needed (except for Internet Explorer 6). This setup script uses [CostumMessages] so that you can easily add multi-language support to your setup and easily configure settings (like the offline dependencies directory) without looking at the [Code] part.

Applications used for the script are:

  • Inno Setup - setup engine (version 5.5.9; unicode version needed for languages like Russian)
  • ISTool - extends Inno Setup but I just needed the isxdl.dll downloader (version 5.3.0)

Known Problems

If dependencies are needed, the required free hard drive size shown before installation is incorrect.

Points of Interest

I wanted to thank the community for sharing many fixes and improvements. Thanks guys, please keep it up! You can now also easily fork and send pull requests at the official Github repository.


  • Oct, 2007
    • Initial version
  • Aug, 2008
    • Now uses dotnetchk.exe to determine which version of .NET Framework and its language pack is installed
    • Added .NET Framework language pack(s) to script
    • Added translation for download page
    • Separated script code into multiple files to make it easier to update the script for different versions of the .NET Framework
  • Jan, 2009
    • Wrote source code modular (each dependency now has one file)
    • Added code for Windows 2000 Security Update KB835732, .NET Framework 1.1, 2.0 SP1, 3.5, 3.5 SP1 and their language packs
    • Remove usage of dotnetchk.exe again as it only worked for .NET Framework 2.0 and below
  • Sep, 2009
    • Code for dependencies installation routine was completely rewritten and is now executed before the actual installation of the application. Setup also checks if all dependencies are installed successfully and if not, displays an error page
    • Added support for 32-bit (x86) and 64-bit (x64) OS including Itanium (ia64)
    • Added code for .NET Framework 2.0 SP2 and its language pack
    • Fixed windows version check bug and language pack check bug
  • Sep, 2011
    • Added support for .NET Framework 4.0, Windows Installer 4.5, Visual C++ 2010 Redistributable, SQL 2008 Express and SQL 3.5 Compact Edition (community)
    • Added helper functions to determine the installed .NET Framework version which removed redundant code
    • Added version strings parser to fix wrong detection for version numbers above 9
    • Added delayed and forced mid-install restart support
    • Added usage of #define in setup.iss (community)
    • Added unicode version of Inno Setup as default for better multi-language support
    • Fixed restart on 3010 resultcode from installers
    • Fixed missing check in Windows 2000 Security Update KB835732
    • Added support for offline files on x64 and IA64 OS
  • Jun, 2014
    • Added support for .NET Framework 4.5.2
    • Fixed installing WIC before .NET Framework 4.0 (community)
    • Fixed Visual C++ 2010 Redistributable install parameters (community)
    • Fixed KB835732 install parameters (community)
  • Jan, 2015
    • Added support for Visual C++ 2005, 2008, 2012, 2013 Redistributable
    • Improved Visual C++ Redistributable detection method (community)
    • Fixed installing products with LCID parameter in certain cases (community)
  • Aug, 2015
    • Added support for Visual C++ 2015 Redistributable (community)
    • Added support for .NET Framework 4.6 (community)
    • Fixed download URL for Visual C++ 2012 32-Bit Redistributable (community)
    • Fixed comparing version numbers with different amount of numbers
  • Aug, 2017
    • Added support for Visual C++ 2017 Redistributable
    • Added support for .NET Framework 4.6.2 and 4.7
    • Added support for DirectX End-User Runtime
    • Added support to install 32-bit version of products on 64-bit operating system
    • Added Russian, Italian, Dutch, Japanese and Korean localizations (community)
    • Improved detection of Visual C++ Redistributables
    • Improved formatting on ready to install page (community)
    • Improved and fixed some localizations (community)
    • Improved and normalized file sections
  • Oct, 2017
    • Added skippable error message if dependency failed to install to be able to continue on errors
    • Fixed detecting C++ Redistributable 2008 in rare cases
    • Fixed encoding of languages relying on Unicode
    • Fixed missing diacritics after last update
    • Fixed incorrectly installing non-supported .NET Framework language packs
    • Disabled download confirmation dialog


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


About the Author

Austria Austria
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionIssues with vcredist2017 Pin
Daniel Montero Hernández5-Jun-18 9:09
memberDaniel Montero Hernández5-Jun-18 9:09 
GeneralMy vote of 5 Pin
Member 1369809026-Feb-18 11:54
memberMember 1369809026-Feb-18 11:54 
QuestionMessage Removed Pin
20-Nov-17 23:43
professionalJeroen De Maeijer20-Nov-17 23:43 
QuestionCzech translation Pin
Milan Cizek30-Oct-17 20:04
memberMilan Cizek30-Oct-17 20:04 
QuestionFile encoding Pin
justscribe26-Aug-17 11:09
memberjustscribe26-Aug-17 11:09 
AnswerRe: File encoding Pin
stfx25-Oct-17 2:29
memberstfx25-Oct-17 2:29 
PraiseWell done ! Pin
RickZeeland23-Aug-17 0:53
mveRickZeeland23-Aug-17 0:53 
QuestionInstalling vcredist offline version displays error message: "An error occured while installing the dependencies..." Pin
acegs14-Aug-17 23:30
memberacegs14-Aug-17 23:30 
AnswerRe: Installing vcredist offline version displays error message: "An error occured while installing the dependencies..." Pin
acegs17-Aug-17 13:45
memberacegs17-Aug-17 13:45 4.5 and 4.5.2 missing Pin
nmg19625-May-17 0:28
membernmg19625-May-17 0:28 
AnswerRe: .net 4.5 and 4.5.2 missing Pin
stfx6-Aug-17 22:58
memberstfx6-Aug-17 22:58 
PraiseExcellent!! Pin
Marco Giovanni19-Sep-16 2:51
memberMarco Giovanni19-Sep-16 2:51 
Question.Net 4.5 Pin
f.digiugno12-May-16 1:42
memberf.digiugno12-May-16 1:42 
AnswerRe: .Net 4.5 Pin
stfx6-Aug-17 22:59
memberstfx6-Aug-17 22:59 
QuestionHelppp Pin
Member 1233397118-Feb-16 4:49
memberMember 1233397118-Feb-16 4:49 
AnswerRe: Helppp Pin
Member 1233397118-Feb-16 6:22
memberMember 1233397118-Feb-16 6:22 
QuestionVerify if already installed Visual C++ Redistributable Pin
Omar.Pessoa16-Feb-16 2:24
memberOmar.Pessoa16-Feb-16 2:24 
AnswerRe: Verify if already installed Visual C++ Redistributable Pin
stfx6-Aug-17 23:00
memberstfx6-Aug-17 23:00 
QuestionSQL 2014 Pin
Vincent DUVERNET (Nolmë Informatique)24-Jan-16 9:56
memberVincent DUVERNET (Nolmë Informatique)24-Jan-16 9:56 
AnswerRe: SQL 2014 Pin
DPlayer5-Mar-16 4:59
memberDPlayer5-Mar-16 4:59 
SuggestionVC++ 2010 SP1; HTTPS URLs Pin
Yves Goergen9-Dec-15 23:22
memberYves Goergen9-Dec-15 23:22 
GeneralRe: VC++ 2010 SP1; HTTPS URLs Pin
Vincent DUVERNET (Nolmë Informatique)14-Feb-16 21:38
memberVincent DUVERNET (Nolmë Informatique)14-Feb-16 21:38 
GeneralRe: VC++ 2010 SP1; HTTPS URLs Pin
Yves Goergen16-Feb-16 10:52
memberYves Goergen16-Feb-16 10:52 
GeneralRe: VC++ 2010 SP1; HTTPS URLs Pin
Vincent DUVERNET (Nolmë Informatique)19-Feb-16 10:21
memberVincent DUVERNET (Nolmë Informatique)19-Feb-16 10:21 
SuggestionGerman translation Pin
Yves Goergen2-Dec-15 9:24
memberYves Goergen2-Dec-15 9:24 

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.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.190306.1 | Last Updated 25 Oct 2017
Article Copyright 2007 by stfx
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid