In my code I'm using the
[Run]
section as well as the CurStepChanged
event handler doing some stuff when the ssPostInstall
occurs. In pseudo script something like this:To run it before the install starts, you would run it in the InitializeSetup section. Something like:; Script generated by the Inno Setup Script Wizard.; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName 'My Program' #define MyAppVerName 'My Program 1.5' #define MyAppPublisher 'My Company, Inc.' Graphical Installer Trial version is a fully functional version of product - it will run for 30 days on your machine without limitations so you can try all features. After 30 days Trial period some features will be disabled (installers made with Trial version will stop working).
My question is, which one is processed as first. Is the
[Run]
section processed before the CurStepChanged
event for the ssPostInstall
step is fired?From what I've observed it seems that the
[Run]
section is processed as first.That is true. The
[Run]
section entries are processed before the CurStepChanged
event for the ssPostInstall
step is fired. It can be read in the following piece of code
(comments are mine):Converting Inno Setup WizardForm.Color to RGB
inno-setup,tcolor
When the first byte is $FF, the last byte is an index in a system color palette. You can get RGB of the system color using GetSysColor function. function GetSysColor(nIndex: Integer): DWORD; external '[email protected] stdcall'; function ColorToRGB(Color: TColor): Longint; begin if Color < 0 then Result := GetSysColor(Color and $000000FF)...
Copy to clipboard in Inno Setup
inno-setup,clipboard
Yes, you can send the WM_COPY message. For example: [Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}My Program [Code] const WM_COPY = $0301; var EditToCopy: TNewEdit; procedure CopyToClipboard(Control: TWinControl); begin SendMessage(Control.Handle, WM_COPY, 0, 0); end; procedure ButtonCopyClick(Sender: TObject); begin EditToCopy.SelectAll; CopyToClipboard(EditToCopy); end; procedure InitializeWizard; var ButtonCopy: TNewButton; WizardPage: TWizardPage; begin WizardPage := CreateCustomPage(wpWelcome,...
InnoSetup - Prevent installer from adding registry entries and being included in programs/features
To elaborate on @Robert's answer: Setting CreateUninstallRegKey to no prevents InnoSetup from creating uninstallation registry keys. So the application won't be listed in Add/Remove Programs control panel. It still can be uninstalled though by locating the unins000.exe (default name) in the application program folder and running it. Note that the...
How to include a script file whose name is read from the INI file?
inno-setup,pascalscript
You cannot inline function result that way. Do it like this: #include 'subfolder' + ReadIni(SourcePath + 'File.ini', 'Section', 'Key', ') + '.iss' ...
Inno Setup ask user for special locations
path,installation,inno-setup
The easiest is to create custom page and show it before the installation (progress page) starts. Prototype: function CreateCustomPage(const AfterID: Integer; const ACaption, ADescription: String): TWizardPage; Description: Creates a custom wizard page. The page is empty by default; you have to create your own controls afterward and place them on...
Registry aren't fully deleting when uninstalling
registry,inno-setup
Your code, as it is, automatically deletes the HKLMSOFTWAREEA GamesNeed for Speed Most Wanted-2012 is deleted. The HKLMSOFTWAREEA Games is not deleted. If you want to delete even the HKLMSOFTWAREEA Games, you have to add an explicit code for it: Root: HKLM; SubKey: SOFTWAREEA Games; Flags: uninsdeletekeyifempty (This should be...
Inno Setup: Conditionally delete non-empty directory in user's home folder
There's no explicit support for this in Inno Setup. But you can code it in pascal script using CurUninstallStepChanged event function: [Code] procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin if CurUninstallStep = usUninstall then begin if MsgBox('Do you want to delete?', mbConfirmation, MB_YESNO) = idYes then begin DelTree(ExpandConstant('{app}Folder'), True, True, True); end; end;...
Create a small web installer using Inno Setup
inno-setup,advanced-installer
Inno Setup does not have this as a 'feature', that is not how it works. You can achieve required behavior in Inno by creating simple installer and modifying the [Code] section. Use ITD Download plug-in to download required files (you need to save appropriate URLs in script) and execute them...
Scale radio button list with font size
inno-setup,pascal
Checkboxes and Radio buttons created on runtime in Inno Setup do not scale their height automatically with DPI/font size. So you have to scale them programmatically. ... RadioButton.Left := WizardForm.TypesCombo.Left; RadioButton.Height := ScaleY(RadioButton.Height); RadioButton.Top := WizardForm.TypesCombo.Top + I * RadioButton.Height; ... Though note that using a non-default font-size for your...
How to pass parameters from Java FX Ant task to Inno Setup?
ant,javafx,inno-setup
The Java FX does not allow you to pass any additional arguments to ISCC.exe. At least according to OpenJFX source code: //run candle ProcessBuilder pb = new ProcessBuilder( TOOL_INNO_SETUP_COMPILER_EXECUTABLE.fetchFrom(params), '/o'+outdir.getAbsolutePath(), getConfig_ExeProjectFile(params).getAbsolutePath()); pb = pb.directory(EXE_IMAGE_DIR.fetchFrom(params)); IOUtils.exec(pb, VERBOSE.fetchFrom(params)); You might do with setting an environment variable instead of parameter and consume it...
Inno setup: detect installation based on product code
There is the MsiQueryProductState function for this. Here is its import with a helper function for your task: [Code] #IFDEF UNICODE #DEFINE AW 'W' #ELSE #DEFINE AW 'A' #ENDIF type INSTALLSTATE = Longint; const INSTALLSTATE_DEFAULT = 5; function MsiQueryProductState(szProduct: string): INSTALLSTATE; external 'MsiQueryProductState{#AW}@msi.dll stdcall'; function IsProductInstalled(const ProductID: string): Boolean; begin...
dynamic path in INI-File called by inno-setup
inno-setup,ini
I think you have to add the base dir from where you want to get one folder up. For example: FileOfOtherProgram='{src}..somefileOther Program.exe' ...
InnoSetup - Disable dropdown list on Selected Components Menu
Just specify a single custom setup type (iscustom flag) and you will get the Select Components screen without the dropdown menu. [Types] Name: 'custom'; Description: 'Custom installation'; Flags: iscustom And include all components into the custom type: [Components] Name: 'program'; Description: 'Program Files'; Types: custom; Flags: fixed Name: 'help'; Description:...
Inno setup error handeling (ignore) in RUN Section commands
.net,inno-setup
If you want to stick to the [Run] section and do not write this in a scripting code, then I think you don't have many options to choose from. An exception is raised whenever a constant cannot be expanded, and that is just this case. The only option I can...
How to completely disable specific component in Inno Setup from code section?
Here is another, still hacky way to do what you want. I've used a different concept here. Essentially, it's about preparing an array of indices of components that should be disabled and unchecked (which I'm callling ghosted here) and calling UpdateGhostItems(False) which unchecks and disables the items of the indices...
Inno Setup Licence Agreement Font Color
inno-setup,pascal
It is not possible to do it unless you subclass that control. One alternative is to create a radio button with no caption and use a label together with it. In that way you can modify the colors of the label.
Install windows 7 software on windows 8
windows-8,installation,inno-setup
Try using the Windows 7 compatibility mode. Right click on the executable. Select properties. Switch to the compatibility tab. Enable the compatibility mode. Set the compatibility mode to Windows 7. And apply settings. Sorry if this is an insult to your intelligence. I wanted to practice the Windows Steps recorder....
Create shortcut based on result of Pascal function
The [Icons] section entry should look like: [Icons] Name: '{userdesktop}Myprog'; Filename: '{code:MyFunctionThatReturnsPath}Myprog.exe' And the corresponding function is: [Code] function MyFunctionThatReturnsPath(Param: string): string; begin Result := 'C:path'; end; The function must take a string argument, even if you do not actually make use of it. See Pascal Scripting: Scripted Constants: The...
Inno setup subfolders with additional installation in “All Programs” list?
exe,inno-setup,drivers
[Setup] DefaultGroupName=MyCompanyNameMyAppName [Icons] Name: '{group}MyNormalModeFunctionShortcut'; Filename: '{app}{#MyAppExeName}'; WorkingDir: '{app}' ;this is default one Name: '{group}MySubfolderNameMySafeModeFunctionShortcut'; Filename: '{app}{#MyAppExeName}'; Parameters: '-safemode'; WorkingDir: '{app}' ;this one is placed in Subfolder ...
Register Explorer COM extension only if specific task was selected
com,installation,inno-setup
Create two entries in [Files]: one with regserver flag to process when IntegrateToExporer task is selected one without the regserver flag to process when IntegrateToExporer task is not selected [Files] Source: 'my.dll'; DestDir: '{app}'; Flags: regserver; Tasks: IntegrateToExporer Source: 'my.dll'; DestDir: '{app}'; Tasks: not IntegrateToExporer See Components and Tasks Parameters...
How to resize an input edit control of the TInputQueryWizardPage page item?
The edit controls for the TInputQueryWizardPage are accessible through the Edits indexed property, so for example to change the width of the first item's edit you would write (indexing is 0 based): var Page: TInputQueryWizardPage; begin ... Page.Edits[0].Width := 150; end; ...
Where should a .NET Web Application store it's (non database) setting
asp.net,.net,inno-setup
With InnoSetup I created a new Wizard page to suggest and collect a Data folder from the user. The installer then: Created that folder and gave All Users Read/Write access, Added a HKLM registry key telling the Web App where to look for the folder, Notified the user that they...
How to create new About button in inno setup?
inno-setup,pascalscript
Here is a simplified, inlined version of the minimum code necessary to do what you've asked for: [Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}My Program [Code] procedure AboutButtonOnClick(Sender: TObject); begin MsgBox('This is the about message!', mbInformation, mb_Ok); end; procedure InitializeWizard; var AboutButton: TNewButton; begin // create an instance of the button and...
Custom setup on operating system and architecture
inno-setup,pascalscript
Use GetWindowsVersion and IsWin64 support functions: if ((GetWindowsVersion >= $06000000) {Vista} and (not IsWin64)) or (GetWindowsVersion >= $06010000) {7} then begin // Install end; ...
Where does Inno Setup IDE store its most recently opened file list?
It is the registry key value list stored under this key: HKEY_CURRENT_USERSoftwareJordan RussellInno SetupScriptFileHistoryNew ...
How to disable “browse” button on defaultDirectory wizard page
You can disable the directory edit box with the browse button this way: [Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}My Program [Code] procedure InitializeWizard; begin WizardForm.DirEdit.Enabled := False; WizardForm.DirBrowseButton.Enabled := False; end; ...
Is there a list of other values besides “ ”, and “-” that are invalid for components in Inno Setup?
The rules for the Name parameter values of the [Tasks] and [Components] sections are: the first char must be an alpha char from range A-Z (case does not matter), or an underscore what follows must be an alpha char from range A-Z (case does not matter), an underscore, a number,...
Microsoft SmartScreen - suspended using InnoSetup installer?
windows,inno-setup,code-signing
If you believe the problem is due to an unsigned uninstaller, make sure you set the SignTool directive of your InnoSetup project accordingly. And make sure SignedUninstaller directive has its default value yes. Quoting http://www.jrsoftware.org/ishelp/index.php?topic=setup_signtool Specifies the name and parameters of the Sign Tool to be used to digitally sign...
Best way to softly close application from inno setup during upgrade
delphi,inno-setup
In Windows Vista and later, you should use the Windows Restart Manager (https://msdn.microsoft.com/en-us/library/windows/desktop/aa373524.aspx) InnoSetup supports it directly, check the [CloseApplications] directive. When run in quiet mode, it will close applications without asking the user....
How to add HEX-Data into Registry with Inno Setup?
The hex entry maps to the REG_BINARY value type, and hex(2) to the REG_EXPAND_SZ type in the *.reg files. Here is the table that shows the *.reg file entry to registry data type mapping (source): ┌─────────────┬────────────────┐ │ File entry │ Registry type │ ├─────────────┼────────────────┤ │ hex │ REG_BINARY │...
data source in windows application is not working after created setup
c#,inno-setup
I found the solution it should be a relative path at the place of absolute while creating a setup of application example of query string is:= SqlConnection oSqlConnection = new SqlConnection(@'Data Source=(LocalDB)v11.0;AttachDbFilename=|DataDirectory|keyDatabase.mdf;Integrated Security=True;MultipleActiveResultSets=True;Trusted_Connection=Yes'); ...
Inno Setup Task checked only if a specific Component is selected
I'm not entirely happy with this solution, but at least it does seem to work. It's possible to do this by creating two similar [Task] entries and displaying either the checked or unchecked one dependent on the components selected, like so: Name: 'SystemInfo'; Description: 'Audit System Information'; GroupDescription: 'Additional Setup...
Can I put setup command line parameters in a file which is called during installation instead?
So customize your installer for different products, I'd recommend you to use a pre-processor and automatically build the installer for each product (with different 'defines'), instead of using an external INI file. For example to be able to change application name and resulting executable when building the installer, use a...
Get the Virtual Store path?
I believe there's even no Windows API to retrieve the path to the virtual store, let only possibility to retrieve it reliably using Inno Setup. But you can guess it to be {localappdata}VirtualStorepath. [Files] Source: 'MyProg.ini'; DestDir: '{code:GetVirtualStore|{app}}' [code] function GetVirtualStore(Path: string): string; var Drive: string; begin Result := Path;...
Create files in Inno Setup setup needed by the [Files] section
It should be: #expr Exec('cmd.exe', '/C 'cd /d %cd% & C:Python34python.exe run.py',',1,SW_HIDE) The cmd.exe is the process you are executing, the rest are arguments. Though even better would be to do without cmd.exe as you do not need it actually: #expr Exec('C:Python34python.exe', 'run.py','c:startupfolder',1,SW_HIDE) See Inno Setup Preprocessor: Exec. Though personally,...
Is it possible to add HTML form in Inno setup?
There's no native support for include web page to Inno Setup installer. Neither I'm aware of any 3rd party extension that would support it. Instead, you can code a custom installer page using CreateInputQueryPage function to query user registration details and send them to your web site. Simple example: [Code]...
Inno Setup URLDownloadToCacheFile (solved)
The original problem was that you were passing nil to a parameter of type Variant. Null value for the Variant type is NULL in Pascal Script. But, your prototype needs to be changed. You need to use Unicode data types when you are using Unicode variant of a function, so...
Is the [Run] section processed before the CurStepChanged event for the ssPostInstall step is fired?
That is true. The [Run] section entries are processed before the CurStepChanged event for the ssPostInstall step is fired. It can be read in the following piece of code (comments are mine): ProcessRunEntries; // <- this processes the [Run] section entries if RmDoRestart and (InitRestartApplications or ((shRestartApplications in SetupHeader.Options) and...
how to refresh a page in inno setup
inno-setup,pascal
Wizard pages have two common properties for the top bar labels, Caption and Description. In your case you can update them e.g. when the page is just displayed, from the CurPageChanged event: [Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}My Program [Code] var MyPage: TWizardPage; procedure InitializeWizard; begin MyPage := CreateCustomPage(wpWelcome, 'Caption', 'Description');...
Conditional DisableProgramGroupPage in Inno Setup
inno-setup,pascalscript
(Elaborating on @TLama's comment) The DisableProgramGroupPage does not support 'boolean expression': [Setup]: DisableProgramGroupPage Valid values: auto, yes, or no Contrary to Uninstallable: [Setup]: Uninstallable Valid values: yes or no, or a boolean expression You can use ShouldSkipPage event function instead: function ShouldSkipPage(PageID: Integer): Boolean; begin Result := False; if PageID...
INNO setup writing a multi line text constant to the registry
installer,inno-setup
Using a simple variable should work. #define mytext 'some long text valuerngoing onto another line' [Registry] Root: HKCU; Subkey: 'Softwaremy companyMy software'; ValueType: string; ValueName: 'Message'; ValueData: '{#mytext}' However, writing a ValueType: string to a registry in Windows means you are writing a REG_SZ. The rn will appear as text...
Save Typed Text To Txt File [INNO SETUP]
![Inno Setup Run Before Install Inno Setup Run Before Install](/uploads/1/2/6/4/126466110/339603257.png)
You are creating the input page when installer starts and immediately saving the fields into text file. You need to wait while user enters the data and clicks Next button on correct page: function NextButtonClick(CurPageID: Integer): Boolean; begin if(CurPageID = Page.ID) then begin // Process the page // Read values...
InnoSetup - while compiling sign tool failed with exit code 0x1
windows-7,windows-8.1,inno-setup
Just remove the extension from rarfile, make it to just 'chrome64', with a batch script rename it while setup the files. In innosetup [Run] Filename: '{app}rename.bat' In rename.bat: @ECHO OFF ren Chrome64 Chrome64.rar del rename.bat I'm just removed the extension from Chrome.exe, and with batch rename it back to exe...
How to show actual application size in control panel?
To modify the setup size that can be seen in the Add/Remove Programs control panel applet you can change the value of the UninstallDisplaySize directive. To set it to a certain (single) file size at the compilation time you can use the preprocessor's FileSize function. For example: [Setup] AppName=My Program...
Inno Setup CreateInputDirPage but don't check for folder existence
inno-setup,pascalscript
You cannot disable the validation. You can workaround that by adding only three inputs using the .Add. And add the fourth input manually, taking control of it. var DataDirPage: TInputDirWizardPage; CustomDirEdit: TEdit; procedure InitializeWizard; var Index: Integer; Offset: Integer; PromptLabel: TNewStaticText; UltimateEdit: TEdit; PenultimateEdit: TEdit; UltimateLabel: TNewStaticText; begin DataDirPage :=...
Can you define a function prototype in InnoSetup
inno-setup,pascalscript
In Pascal (including a Pascal Script used in Inno Setup), you can define a function prototype (aka forward declaration) using a forward keyword: procedure ProcA; forward; procedure ProcB; begin ProcA; end; procedure ProcA; begin // some code end; See Forward declared functions....
Inno Setup: how to use {app} in InitializeWizard?
The InitializeWizard event method is triggered right after the wizard form is created, so it is too soon to pass the {app} directory to the plugin (the WizardDirValue function would do the same), because the user haven't passed the directory input page. You will need to move your code into...
Inno Setup: Display desktop shortcut on Finish Page
Not directly. You have to basically implement your own set of checkboxes, and handle them on your own. I'm doing the same in my installer. See my .iss. The Numbers in the list below point to respective lines in my code. In InitializeWizard create a set of checkboxes on WizardForm.FinishedPage....
Why do I get “Variable Expected” compiler error?
inno-setup,pascalscript
The Variable Expected compiler error you got because Delete is a procedure into which you are expected to pass a declared string type variable (which is then internally modified). And you are not passing a variable but an intermediate result of the UpperCase function call. So to fix this error...
Innosetup task Page edit
checkbox,task,inno-setup
THIS IS THE ANSWER FOR MY QUESTION THANKS AND CREDIT GOES TO 'TLama' Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName 'My Program' #define MyAppVersion '1.5' #define MyAppPublisher 'My Company, Inc.' #define MyAppURL 'http://www.example.com/' #define MyAppExeName...
Inno Setup is a free installer for Windows programs. First introduced in 1997, Inno Setup today rivals and even surpasses many commercial installers in feature set and stability.
Inno Setup key features:
- Support for every Windows release since 2000, including: Windows 10, Windows 8.1, Windows 8, Windows Server 2012, Windows 7, Windows Server 2008 R2, Windows Vista, Windows Server 2008, Windows XP, Windows Server 2003, and Windows 2000. (No service packs are required.)
- Extensive support for installation of 64-bit applications on the 64-bit editions of Windows. Both the x64 and Itanium architectures are supported. (On the Itanium architecture, Service Pack 1 or later is required on Windows Server 2003 to install in 64-bit mode.)
- Supports creation of a single EXE to install your program for easy online distribution. Disk spanning is also supported.
- Standard Windows wizard interface.
- Customizable setup types, e.g. Full, Minimal, Custom.
- Complete uninstall capabilities.
- Installation of files:
- Includes integrated support for 'deflate', bzip2, and 7-Zip LZMA/LZMA2 file compression. The installer has the ability to compare file version info, replace in-use files, use shared file counting, register DLL/OCX's and type libraries, and install fonts.
- Creation of shortcuts anywhere, including in the Start Menu and on the desktop.
- Creation of registry and .INI entries.
- Running other programs before, during or after install.
- Support for multilingual installs, including right-to-left language support.
- Support for passworded and encrypted installs.
- Support for digitally signed installs and uninstalls, including dual signing (SHA1 & SHA256).
- Silent install and uninstall.
- Unicode installs.
- Integrated preprocessor option for advanced compile-time customization.
- Integrated Pascal scripting engine option for advanced run-time install and uninstall customization.
- Full source code is available (Borland Delphi 2.0-5.0 and 2009).
Inno Setup 6.0.3 changelog:
- /LOG: Now logs Windows compatibility mode when this is activated by the user.
- Added new [Setup] section directive: SignToolRunMinimized.
- [Setup] section directive UsePreviousLanguage now also has an effect when the Select
- Language dialog is not displayed because Setup is for example running silently.
- Checkboxes displayed by lists now look better on high DPI systems.
Compiler IDE changes:
- Added Dark theme support to the toolbar.
- When paused on a breakpoint in the [Code] section the new 'Debug Call Stack' view now shows the call stack.
- The 'Compiler Output' and 'Debug Output' views now support multi selection, an extra Select All popup menu item and Ctrl+C and Ctrl+A keyboard shortcuts. The Copy action now only copies the selected lines instead of all lines.
Inno Setup Preprocessor (ISPP) changes:
- Array variables declared with #dim can now be initialized directly, like #dim MyArray[3] {1, 2, 3} for example.
- Added new predefined variable Tab.
Pascal Scripting change:
- Added new Set8087CW and Get8087CW support functions.
Some messages have been added in this version:(View differences in Default.isl)
- PrepareToInstallNeedsRestart: This message is used by the Preparing to Install wizard page if a restart is needed. If this message is not set by a translation, Setup will instead use FinishedRestartLabel and FinishedRestartMessage as before.
- ComponentsDiskSpaceGBLabel and DiskSpaceGBLabel: These messages are used by Setup to display required disk spaces of 1000.0 MB or more in gigabytes instead of in megabytes. If these messages are not set by a translation, Setup will instead use ComponentsDiskSpaceMBLabel and DiskSpaceMBLabel as before.
Other changes:
- Added official Slovak translation.
- Minor tweaks and cosmetic fixes.
Download: Inno Setup 6.0.3 | 3.9 MB (Freeware)
View: Inno Setup Website | Release Notes
View: Inno Setup Website | Release Notes
Get alerted to all of our Software updates on Twitter at @NeowinSoftware