Making an Inno Setup installation run silently by default [duplicate] - inno-setup

This question already has an answer here:
Run installation using Inno Setup silently without any Next button or Install button
(1 answer)
Closed 8 months ago.
Inno Setup has a /VERYSILENT option, which suppresses wizard and progress windows. I would like this behavior to be the default when the executable is run without parameters.
Is there a way to achieve this using directives in the Setup section, preprocessor tricks or other clever methods? I'm aware of directives such as DisableStartupPrompt that disable specific wizard pages; my goal is to be VERY silent. :-)

The short answer to your question is "no." Inno Setup is an installer builder that requires a specific request from the user via the command line (/silent, /verysilent) to run a hands-free installation. This is by design.

Related

Can you force Inno Setup to override or ignore ArchitecturesAllowed with a command line param?

We are using ArchitecturesAllowed and it is working fine at present.
Is it possible to use something like a command line parameter to instruct Inno to "ignore ArchitecturesAllowed, just install it anyway"?
I don't see anything like this in https://jrsoftware.org/ishelp/index.php?topic=setupcmdline. I know its possible to create custom command line params but I don't see how programmatically that would allow for this.
This might be useful for us in some strange corner cases where our installer does not support a particular architecture but we need to work around a customer problem. (Specifically I'm thinking of Windows 11 running in a VM on a Mac, but there could be other cases.)
I know there are approaches like in Can Inno Setup detect Windows11 on ARM64 hardware which can emulate x64? which allow circumventing ArchitecturesAllowed entirely, but that seems like an alternative approach.
Also I can see that the error message can be customized; but that doesn't change the actual setup behavior: Show a custom message for unsupported architectures
No.
Using the approach you know (Can Inno Setup detect Windows11 on ARM64 hardware which can emulate x64?) combined with a custom command line switch is the only way.

Is there no built-in solution for creating mutexes?

In Inno Setup, there is the AppMutex directive.
Using this directive, one can make Inno Setup stop / not start while this mutex exists.
I experience it sometimes that my users accidentally open my application while the setup (and update in this case) is still running.
This locks files, and Inno Setup can not replace them.
The solution in my opinion would be that Inno Setup creates a mutex and automatically closes it when it's finished.
When the user starts my app, the app would check if the mutex (which was created by Inno Setup) exists, and if it does, my app would close right away.
However, I do not find this as a built-in option in Inno Setup.
Do I have to code it manually, or am I missing something?
Thank you!
That's what SetupMutex directive does.
Or you can do it programmatically using CreateMutex function.

Inno Setup:Automatic rollback process

As part of installation, sometimes i see few erors during a file replacement etc, so then inno setup gives a message like "abort/retry/ignore" if the user chooses abort inno setup rollbacks the installation.
So i want to know 2 things here
1)I wanted to know from my installer, whether a roll back is invoked or not? can inno setup give any acknowledgeent for automatic rollback happend or not?
2)what are the steps of rollback, what all does it do in that? a detailed explanation would be very helpful...

Inno Setup: is it a script based deployment program?

I am using Inno Setup for the first time. When I start the program I am presented with a blank script page. Is scripting the only way you can create a setup package? Is there anything else?
Yes, Inno Setup is script-based (thank God -- this really makes things a lot easier if you ask me). But there is a "wizard" that lets you create a new setup by a simple step-by-step approach in a simple GUI. Simply choose "Create a new script file using the Script Wizard" in the "Welcome" dialog box that appears when you start the Inno Setup Compiler.
If you have disabled the Welcome dialog box, use File/New instead to start the wizard.
Update
I was just informed about the new InnoIDE.
Inno Setup is script based. If you want a GUI Builder then you may check the site "Third-Party Files" on Inno Setups Homepage.
The easiest way to start is with one of the example scripts included with the install.
Just change the product name in the sample and you are set for 90% of basic installs

INNO: Disallow "Ignore" when file is in use

I am using Inno Setup for the installer for my windows application. If a user has the application when the installer is run (eg. for an update), the installer will stop when it is unable to replace a file in use, and it allows the user to select whether to Abort, Ignore, or Retry.
I would like it to only allow Abort or Retry and remove the option to Ignore. Does anyone know how this can be done?
Or if this can't be done, how can I make the installer abort if the application is running?
The easy way to detect whether the application is running requires co-operation from the application, so it's best to work this out before you ship your first version. Use Inno Setup's AppMutex setting. There is an example in the Inno Setup knowledge base for setting up a mutex visible in multiple sessions. There is more about AppMutex in Inno Setup's help file.

Resources