Is there any way to programmatically alter the AppName in Inno Setup? Perhaps a registry value that can be set towards the end of the installation? My customer needs to be able to install multiple instances of my application with slightly different behaviors, and it would be ideal if AppName could be altered to during the install accomodate this (note that versioning is a separate consideration).
I'm afraid that 'AppName' is a required scripting directive and cannot be changed after your Inno Setup script is compiled into an installer.
It seems strange that you need multiple instances of your application installed on the same machine that each behave slightly different. Why is this necessary? What does this accomplish? I'm willing to bet that this should be addressed instead of modifying your Inno Setup installation script.
Related
I have a set of files (scenery data of an airport) that should be installed to one of several applications (3 different flight simulators) depending on the target applications being installed. If more than one is installed, the user has to choose into what application the set of files should be installed.
Of course I could write for each application a separate installer but that would make it awkward to maintain and blow up the number of installers since there are many sets of files to install.
Problem is that depending on the chosen application the AppId, the installation destination and other installation values changes.
I intend to write a custom wizard page that is shown immediately after the welcome page to find out which of the target applications are installed and let the user choose the required application in case there are several installed.
My current problem is that the files to copy are not fully the same for each possible application. So I need in the [Files] section the posibility to copy a file to its target location depending on the application selected. I hoped to find a general parameter for the [Files] section that could be used to copy or not. But I could not find one. How could I solve this problem? I also studied [Components] and [Tasks] to find a solution but was not successful.
Thanks for any hint how to solve my problem!
To answer your literal question: Use Check parameter to bind [Files] (and other) section entries to the selection on the custom page.
Some examples:
Inno Setup - Multiple software versions in one installation
How to install only file based on condition (external configuration file) in Inno Setup
Conditional file copy in Inno Setup
Inno Setup: How to auto select a component by comparing a register key version?
Though you also might consider using a preprocessor to easily maintain and auto-generate multiple installers from same source script.
For an example, see:
Compile Inno Setup installer for specific component only
I'm very new to Inno Setup, so forgive my ignorance on this one.
I created a very small install script and it's building and working the way I want—I get my setup.exe built to the output directory, and all the source files are being copied to my specified destinations.
Now I want to make sure users can uninstall the files that I specified in my [Files] section of my script. The problem is I don't understand how Inno Setup handles this. I assume Inno Setup doesn't make an executable specifically for Uninstall, but even if I run setup.exe after I have installed my application, the wizard doesn't ask if I want to uninstall.
However, if I enable the Run menu's Target Uninstall in the ISC compiler, I am able to uninstall the files. So my question is, how do I uninstall my application outside of the ISC compiler. In my [Setup] section I do have Uninstallable=yes.
I know this is a total noob question, but any help is appreciated.
(As you have found yourself), Inno Setup creates an entry in Add/Remove Programs Control Panel applet (if CreateUninstallRegKey is yes).
The entry is a link to an uninstaller program, which is generated by the compiler (when Uninstallable is yes).
The uninstaller program is located by default in the application directory (unless overridden by UninstallFilesDir) and is named unins001.exe (the number is incremented, if needed, to avoid naming conflicts).
I have an application installer created with Inno Setup that deploys multiple binaries and support files for my application.
When I perform an upgrade installation (e.g. run setup-1.5.exe while version 1.0 is already installed), some of the files from the previous version are frequently in-use, and cannot be replaced until the next reboot. That is fine, Inno handles that case correctly.
However, the logic I really want is: if any files cannot be replaced until the next reboot, then I want all files to be replaced on the next reboot. Otherwise, binaries that are in use are not replaced but some support files might be, leaving the application in an unstable state prior to reboot anyway.
Is there a clean way to accomplish this? I have not been able to find one, short of locking all the support files myself explicitly, which is quite ugly.
Thanks!
Inno can't do this natively. This is why it provide AppMutex and friends to ensure that it's all clear, and if anything is left, it tells the user that they must reboot.
You can then expand on this in your app and refuse to start if a restart replace action is pending.
I have an application that uses Inno Setup as its installer.
I am now writing an updater using Inno Setup to apply some updates to various installed locations.
This application can be installed on removable flash drives as a portable app and I would like to be able to roll out the updates across several drives/locations/directories for each drive attached to the PC at once.
Is there a way to get Inno Setup to roll out its contents as an update to each location in an array of locations?
Not directly. One option is to build an install for the files that is designed to be silent.
Then write a second install that compiles that uses the first one. Then you [Code] Section you could call ShellExecute() executing the first installer. You could call the first installer as many times as you wanted.
Although, I suspect this may really creates havok on the Add/Remove Programs.
I have a program that has only a few differences between Development, QA and Production.
I'd like to be able to use the same compiled file for each environment and include a small configuration file containing the settings which are environment specific.
Does anyone know how I can accomplish this?
Thanks
Inno Setup is capable of accepting command line parameters. You could then use those parameters to make decisions about what gets installed or how settings are configured. Then you can do something like call the installation program "Setup.exe -QA" to install with the QA settings, or "Setup.exe -PROD" to install with the Production Settings.
Have a look in the Inno Setup help files for documentation on how to use command line parameters in your installer.
Can you not just add a private variable or constant within InnoSetup that indicates which build it should create and code against this within InnoSetup?