How to have multiple Main Executable files with Inno Setup? - inno-setup

I am trying to package an office program in a setup file, and it has more than one (three to be be exact) main executables each which start your Word, Spreadsheet, and powerpoint software seperatly. Thanks

Inno Setup itself has no concept of the "main executable". This only appears in the wizard for simplification.
Once the script has been created, you can install as many [Files] or [Icons] as you want for every "main executable".

Related

Way to construct Innosetup setup script from Executable

I had put little bit effort to create an Inno installer.It had around 2 files.I just missed backuping 1 file.So is there a way to contruct the inno setup script from the compiled installer.

How to support thousands of files using Inno Setup?

I'm using Inno Setup to write an installer for an application based on Node.js. Then our node application (including modules) consists of almost 4,000 files. The installer needs to copy all of these files, as well as remove them during uninstallation.
I've already written this to use a ZIP file which gets extracted during installation, and recursively delete files during the uninstall. But I would have to write a tremendous amount of code to be able to properly handle file copy/replace/delete operations, while I could register them in my Inno Setup script and let the installer do all that work (as it's designed to do). The problem with that is I'm not about to manually write almost 4k lines of code (and manage them when frequent additions are made) for each file. I could write a small app to iterate through the files and write ISS script, but that's another project I'm not about to start.
Is there a way to not only add, but manage groups of files in bulk in recursive folders? Perhaps a custom IDE meant for this?
There are many way to add all files to inno setup:
You can use Flags: recursesubdirs;
For example:
[Files]
Source: "C:\Source Folder\*"; DestDir: "{app}"; Flags: recursesubdirs
You can use inno setup quick start pack
You can install Only Istool
TO put files in Istool open Files and directory section in Istool Drag and drop all (Select Thousand of files or Folder if any with Ctrl+A)
Thousand Of files in the Files and directory section of Istool and save.
PS: If you use Istool then save the Documents and open with inno setup.
I personaly Use Istool.
Thanks

How to execute program before the uninstallation starts?

Can InnoSetup execute a program before the uninstallation starts? My program creates some registry values. I have an executable that can remove those registry values and my question is, can InnoSetup run that executable before the uninstallation starts?
See the documentation on Setup Script Sections, particularly the UninstallRun one at the bottom of the tree:
[UninstallRun]
Filename: "{app}\INIT.EXE"; Parameters: "/x"
If you need to do something more complex, you can also do it in code using the Pascal scripting functionality in InnoSetup. See UninstallCodeExample1.iss' in theInnoSetup 5\Examples` folder.

How can you harvest files for Inno Setup

I am trying to find a tool similar to heat for WiX that will allow me to harvest file and folder entries for Inno Setup. Is there anything available?
Edit: Heat is used to harvest installation artifacts (files, folders, registry entries, etc) from a machine and generate a WiX source file. I know Wise for Windows Installer had a wild card option that performed a similar function. I have not found anything similar for Inno Setup.
I am trying to include hundreds of files (dozens of folders) of sample projects and data to go with our application installation. These will change between releases and I was hoping to automate this portion of the installation authoring.
You can include an entire directory tree via wildcards and recursion, eg:
[Files]
Source: somewhere\root\*; DestDir: {app}\Data; Flags: recursesubdirs
(If you want to include empty directories as well, add the createallsubdirs flag too.)
There is no direct equivalent for registry entries, but eg. ISTool can convert a .reg file into the corresponding [Registry] entries.

how to display please wait dialog during EXEC() function

how to display please wait dialog while EXEC() runs another application silently.
You can use a ProgressOutputWizardPage, which works just fine for me, which isn't exactly complicated. You can refer to the CodeDlg.iss example.
Do you really need it to be a message box? As you might know, you can run an external *.exe during setup, and have a custom status message shown meanwhile. (The status message will be on the usual progress label during installation.)
I have a setup.exe that installs product A. This setup.exe contains a setup2.exe file, used to setup product B. setup.exe copies setup2.exe to the Program Files folder during the installation of product A. When all files have been copied, setup.exe then starts setup2.exe in the background. To accomplish this, i have done
[Run]
Filename: "{app}\setup2.exe"; StatusMSG: "Installing Product 2..."; Parameters: "/VERYSILENT /SUPPRESSMSGBOXES"
in setup.iss (that compiles to setup.exe). setup2.exe is also an Inno Setup installer, so the parameters "/VERYSILENT /SUPPRESSMSGBOXES" will make the installation of product 2 silent. During this setup, setup.exe will show the message "Installing Product 2...".
If you really need a message box to popup with the status message, you'll have to resort to Pascal scripting.

Resources