Inno Setup Version

Posted on  by 

Download inno setup windows, inno setup windows, inno setup windows download free.

From Jordan Russell:
  1. Inno Setup enables to work with the system registry, files and also supports the powerful work of scripting and programming language Pascal. The software allows you to use a special step by step wizard to facilitate the creation of installer. Inno Setup also supports compression, which can significantly reduce the size of the installer.
  2. May 28, 2019  Inno Setup is sometimes distributed under different names, such as 'Inno Setup verso', 'Inno Setup versio', 'Inno Setup verzi'. Commonly, this program's installer has the following filenames: Compil32.exe, fixcodecs.exe, CodecTweakTool.exe, axereltavolitas.exe and Smart.exe etc. The most popular versions of the tool 5.5, 5.4 and 5.3.

Inno Setup is a free, feature-packed installation builder. The application's features include a Windows 2000-style wizard interface; the ability to create a single EXE for easy online distribution; support for disk spanning; and full uninstall capabilities. The program also includes customizable setup types, integrated LZMA file compression, support for installing shared files and OCXs, and the creation of Start menu icons, INI entries, and registry entries. Full Delphi source code is available on the author's Web site.

Inno Setup Documentation

What do you need to know about free software?

Inno Setup Version From File

From Jordan Russell:

Inno Setup is a free, feature-packed installation builder. The application's features include a Windows 2000-style wizard interface; the ability to create a single EXE for easy online distribution; support for disk spanning; and full uninstall capabilities. The program also includes customizable setup types, integrated LZMA file compression, support for installing shared files and OCXs, and the creation of Start menu icons, INI entries, and registry entries. Full Delphi source code is available on the author's Web site.

In this guide I will walk through how to get the .NET framework to download and install on-the-fly in an Inno Setup installer.

It works in 3 steps:

  1. Detect if the desired .NET framework is installed
  2. Download the .NET Framework bootstrap installer with Inno Download Plugin
  3. Run the bootstrap installer in quiet mode, which will download and install the .NET Framework. This is better than downloading the full installer since it only downloads the files it needs for your platform.
Inno setup documentation

Detecting if the desired .NET Framework is installed

First you need to determine what registry key to check to see if your .NET version is installed. There is a good Stack Overflow answer that covers this, though the MSDN page is more likely to be up to date. There is also a good article on how to apply that in Inno Setup's Pascal scripting language.

I wrote mine to check for .NET 4.5. I use this helper function, in the [Code] section of the .iss file:

function Framework45IsNotInstalled(): Boolean;
var
bSuccess: Boolean;
regVersion: Cardinal;
begin
Result := True;
bSuccess := RegQueryDWordValue(HKLM, 'SoftwareMicrosoftNET Framework SetupNDPv4Full', 'Release', regVersion);
if (True = bSuccess) and (regVersion >= 378389) then begin
Result := False;
end;
end;

Downloading the bootstrapper

Next we need to find out where to download the installer from. The .NET Framework Deployment Guide for Developers has a great list of stable download links for the bootstrapper (web) installers. I picked 4.5.2, as it still supports code targeting .NET 4.5, and we might as well give the users the latest we can. This link should prompt you to download an .exe file directly; if it's bringing you to a download webpage, it won't work.

Now install Inno Download Plugin and put this at the top of your .iss file:

#include <idp.iss>

Inno Setup Compiler Download

Put this in the [Code] section:

procedure InitializeWizard;
begin
if Framework45IsNotInstalled() then
begin
idpAddFile('http://go.microsoft.com/fwlink/?LinkId=397707', ExpandConstant('{tmp}NetFrameworkInstaller.exe'));
idpDownloadAfter(wpReady);
end;
end;

This 'InitializeWizard' method is a special one that InnoSetup calls when first setting up its wizard pages. We call our helper function to detect if the framework is installed, then schedule a download step after the 'Ready to install' page. We include our direct download link determined earlier, and save it in a temp folder, with a file name of 'NetFrameworkInstaller.exe'. This name I picked arbitrarily; we just need to refer to it later when we're installing and cleaning up.

Installing the bootstrapper

We'll make another helper method to do the actual install. We specify another specially named method to hook our code up after the post-install event:

procedure InstallFramework;
var
StatusText: string;
ResultCode: Integer;
begin
StatusText := WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption := 'Installing .NET Framework 4.5.2. This might take a few minutes...';
WizardForm.ProgressGauge.Style := npbstMarquee;
try
if not Exec(ExpandConstant('{tmp}NetFrameworkInstaller.exe'), '/passive /norestart', ', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
begin
MsgBox('.NET installation failed with code: ' + IntToStr(ResultCode) + '.', mbError, MB_OK);
end;
finally
WizardForm.StatusLabel.Caption := StatusText;
WizardForm.ProgressGauge.Style := npbstNormal;
DeleteFile(ExpandConstant('{tmp}NetFrameworkInstaller.exe'));
end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
case CurStep of
ssPostInstall:
begin
if Framework45IsNotInstalled() then
begin
InstallFramework();
end;
end;
end;
end;

We're running the bootstrapper we downloaded earlier, with a flag to make the install passive (non interactive). Our main installer will show this screen while the framework is getting downloaded and installed:

Then the .NET installer UI will show alongside the first window:

If you'd like to keep it 'cleaner' and just show the first screen you can swap out the /passive argument for /q. However I like showing the user the .NET install progress since it can take a long time and it reassures them that work is still really happening.

After running the installer, the bootstrapper is deleted (whether or not the install succeeded).

And now your installer is done!

Testing the installer

Version

Inno Setup Unicode Version

To test a .NET 4 or 4.5 install, I'd recommend setting up a Windows 7 virtual machine in Hyper-V. Windows 7 comes with .NET 2, 3 and 3.5 out of the box, but not .NET 4 or 4.5. After it installs the framework you can go to Programs and Features to cleanly remove it and test it all over again.

Inno Setup Get Version From File

To test an earlier .NET version you should just be able to use a modern OS like Windows 8.1 or 10.

Coments are closed