Click here to Skip to main content
Click here to Skip to main content

Modular InnoSetup Dependency Installer

, 29 Jan 2015 CPOL
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 and others on 32-bit and 64-bit Windows.


Once upon a time, I needed an installer for my .NET applications. I knew that I could use the "genius" ClickOnce installer, but in my opinion it has a bad interface and is not very handy. Then I came across a script for InnoSetup that had everything I wanted, but unfortunately it was only for .NET 1.1. So, I spent quite a bit of time in InnoSetup to modify it to my needs and extending it vastly.


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. You only have to change the [CustomMessages] part and [Files] part (inclusion of isxdl language files)
    • 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)
      • 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
      • 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
      • 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.

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.5)
  • 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

Special thanks to Ted Ehrich who created the .NET Framework 1.1 script.

I also 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.


  • 14 Oct, 2007
    • Initial version
  • 15 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
  • 1 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
  • 1 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
  • 23 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
  • 2 Jun, 2014
    • Added support for .NET Framework 4.5 - 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)
  • 29 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)


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

Comments and Discussions

QuestionWin 2008 R2 installation using the role manager Pinmembertorno22-Jan-13 5:47 
AnswerRe: Win 2008 R2 installation using the role manager Pinmembertorno24-Jan-13 3:13 
GeneralRe: Win 2008 R2 installation using the role manager PinmemberHarald Binkle4-Apr-13 3:49 
GeneralRe: Win 2008 R2 installation using the role manager PinmemberFreddyvdh15-Jan-14 6:22 
GeneralRe: Win 2008 R2 installation using the role manager PinmemberBinkle@JAM15-Jan-14 22:05 
QuestionI dont know this code "OutputBaseFilename={#MyAppSetupName}-{#MyAppVersion}" Pinmembersun mi Kang15-Jan-13 15:12 
AnswerRe: I dont know this code "OutputBaseFilename={#MyAppSetupName}-{#MyAppVersion}" PinmemberAtlence24-May-13 2:06 
GeneralMy vote of 5 Pinmembersun mi Kang15-Jan-13 15:01 
GeneralMy vote of 5 PinmemberFelicia Santoro-Petti2-Jan-13 6:01 
QuestionGoogle Chrome Installation Check Pinmemberkalpesh28041-Jan-13 20:14 
QuestionJava Installation Check Pinmemberkalpesh28041-Jan-13 20:04 
GeneralMy Vote Of 5+ PinmemberZac Greve18-Dec-12 18:19 Framework 4.5 Pinmemberairscape18-Dec-12 14:00 
SuggestionRe: .net Framework 4.5 PinmemberMember 967595128-Jan-13 1:01 
You also need to add the following lines to your setup.iss file:

#define use_dotnetfx45full
in the head

#ifdef use_dotnetfx45full
#include "scripts\products\dotnetfx45full.iss"
below the block starting with #ifdef use_dotnetfx40

and finally
#ifdef use_dotnetfx45full
before the section #ifdef use_wic
GeneralMy vote 5 PinmemberDato001119-Nov-12 3:54 
QuestionKB835732 doesn't work in Windows 2000 setup PinmemberVinny Lawlor12-Nov-12 7:15 
QuestionDirectX Installation PinmemberTheRacerMaster26-Oct-12 18:47 
AnswerRe: DirectX Installation Pinmemberdaveaton9-Mar-13 17:40 
GeneralRe: DirectX Installation Pinmemberstfx10-Mar-13 0:28 
GeneralRe: DirectX Installation Pinmemberdaveaton10-Mar-13 8:36 
Questiondependency file not added to output setup.exe PinmemberMember 80634354-Oct-12 14:23 
AnswerRe: dependency file not added to output setup.exe PinmemberMember 80634355-Oct-12 2:38 
AnswerRe: dependency file not added to output setup.exe Pinmemberstfx5-Oct-12 23:26 
AnswerRe: dependency file not added to output setup.exe PinmemberMember 905500031-Oct-12 5:37 
GeneralMy vote of five PinmemberMichael Estwik12-Aug-12 12:53 
SuggestionMS Compact Database Version 4.0 [modified] PinmemberFreddyvdh12-Jul-12 4:44 
QuestionDetecting/Installing VC++ 2010 Runtime PinmemberMember 865677420-Jun-12 9:41 
AnswerRe: Detecting/Installing VC++ 2010 Runtime PinmemberMember 865677420-Jun-12 9:43 
QuestionDanish translation for you PinmemberMember 80309463-Jun-12 10:32 
QuestionAn error occured while installing...- message Pinmemberelmi0111-May-12 11:55 
QuestionHow to put a restart? Pinmemberandrescasta14-Apr-12 12:52 
Questionsql compact fails install Pinmemberred2ltd5-Mar-12 10:55 
QuestionRe: sql compact fails install Pinmemberbastek7929-Mar-12 3:09 
AnswerRe: sql compact fails install Pinmemberstfx11-Apr-12 12:43 
GeneralRe: sql compact fails install PinmemberFreddyvdh8-May-12 2:37 
GeneralRe: sql compact fails install Pinmemberse7enth8-May-12 5:06 
GeneralRe: sql compact fails install PinmemberFreddyvdh9-May-12 4:02 
Questionnewer c++ 2010 residistributable package already installed Pinmembermatthias_791-Mar-12 23:52 
AnswerRe: newer c++ 2010 residistributable package already installed PinmemberMember 874435120-Mar-12 15:04 
GeneralRe: newer c++ 2010 residistributable package already installed PinmemberMember 865677420-Jun-12 9:39 
QuestionDetecting/Installing VC++ 2008 Runtime PinmemberMember 865677418-Feb-12 8:04 
AnswerRe: Detecting/Installing VC++ 2008 Runtime PinmemberMember 865677420-Feb-12 0:00 
GeneralRe: Detecting/Installing VC++ 2008 Runtime Pinmemberstfx11-Apr-12 12:58 
GeneralRe: Detecting/Installing VC++ 2008 Runtime PinmemberMember 865677420-Jun-12 9:37 
QuestionNeed the following scripts... PinmemberHrizip6-Feb-12 3:05 
QuestionMaybe a stupid question, but... PinmemberHrizip3-Feb-12 7:49 
AnswerRe: Maybe a stupid question, but... PinmemberHrizip6-Feb-12 3:02 
QuestionComponents PinmemberBARTO_1827-Jan-12 8:50 
AnswerRe: Components PinmemberFreddyvdh25-Sep-12 1:15 
AnswerRe: Components PinmemberFreddyvdh25-Sep-12 4:50 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150331.1 | Last Updated 29 Jan 2015
Article Copyright 2007 by stfx
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid