Merging event function (InitializeWizard) implementations from different sources

When you are reusing various feature implementations from different sources, those commonly implement the same Inno Setup event functions (like the InitializeWizard). The solution for Inno Setup 6 is very simple, as shown below. In older versions it’s more complicated. See lower. Inno Setup 6 Inno Setup 6 has event attributes features that helps solving … Read more

Placing image/control on Inno Setup custom page

That’s what TWizardPage.Surface of type TNewNotebookPage is for. with BtnImage do begin Parent := CustomPage.Surface; { … } end; Related questions: TInputDirWizardPage with Radio Buttons (Similar question about radio buttons with more code) Add additional controls to standard Inno Setup pages? Also, never use absolute coordinates and sizes. Your layout will break, when the wizard … Read more

Edit installed XML file according to user preferences in Inno Setup

You probably just need to edit the file after the installation completes. procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep = ssPostInstall then begin SaveValueToXML( ‘C:\AutoScan.exe.config’, ‘//configuration/system.serviceModel/client/endpoint/address’, CustomEdit.Text); end; end; Also you should not load the value every time you get to the custom page, because you reset user preference, every time user returns back to the … Read more

Determine Windows version in Inno Setup

In most Inno Setup sections (like [Files], [Tasks], [Run], etc.) you can use the MinVersion and OnlyBelowVersion common parameters. [Files] Source: MyDllForVistaAndNewer.dll; Dest: {app}\MyDll.dll; MinVersion: 6.0 Source: MyDllForOldWindows.dll; Dest: {app}\MyDll.dll; OnlyBelowVersion: 6.0 In Pascal Script, use the GetWindowsVersionEx function to find the Windows version number. Then compare the number against a specific Windows version number. … Read more

Inno Setup Get progress from .NET Framework 4.5 (or higher) installer to update progress bar position

The following shows Pascal Script implementation of the code from How to: Get Progress from the .NET Framework 4.5 Installer [Files] Source: “NDP462-KB3151800-x86-x64-AllOS-ENU.exe”; Flags: dontcopy [Code] // Change to unique names const SectionName=”MyProgSetup”; EventName=”MyProgSetupEvent”; const INFINITE = 65535; WAIT_OBJECT_0 = 0; WAIT_TIMEOUT = $00000102; FILE_MAP_WRITE = $0002; E_PENDING = $8000000A; S_OK = 0; MMIO_V45 = … Read more