How to prevent an installer from launching the program automatically after the installation when using /SILENT or /VERYSILENT ?

1,060 views
Skip to first unread message

ViRazY

unread,
Nov 17, 2021, 1:16:36 AM11/17/21
to innosetup
Hello, I have a program I wanna install using the /SILENT or /VERYSILENT command line parameters, but it automatically launches after the installation, which I don't want.

Is there any way to disable that with a command line parameter or setup config that can be loaded with /LOADINF ?

I should add that I am just a user and not the creator of the software I wanna install, I just need to install it automatically on some machines and it launching after the installation interferes with my automated setup.

Thanks!

Bill Stewart

unread,
Nov 17, 2021, 10:26:27 AM11/17/21
to innosetup
On Tuesday, November 16, 2021 at 11:16:36 PM UTC-7 ViRazY wrote:

Hello, I have a program I wanna install using the /SILENT or /VERYSILENT command line parameters, but it automatically launches after the installation, which I don't want.

Inno Setup installers don't, by default, start an app after installing. (They can optionally be written to do so, of course, but this is at the discretion of the installer's author.)

If the installer you are running has "hard-coded" the application to start automatically after installation, then no, there is no command line parameter that would prevent that (unless the installer's author built the installer to support it; see below).

Some potential exceptions to this (again, depending on how the installer is designed) are:

* If the installer is using an IS task to decide whether to start the application, then you would omit that task when installing

* If the installer supports a custom command-line parameter to prevent launching the app, then use that (the only way you would know this parameter exists would be to examine the installer source or ask the author)

These types of exceptions would depend on how the installer is built.

If these exceptions don't apply to the installer you're running, then I would say that the author of the installer is not doing things in a very polite way or possibly hasn't considered that someone might want to install silently.

Bill

ViRazY

unread,
Nov 17, 2021, 10:40:35 AM11/17/21
to innosetup
Thanks, that makes sense.

How would I go about figuring out whether or not it's using a task?

Gavin Lambert

unread,
Nov 17, 2021, 5:59:59 PM11/17/21
to inno...@googlegroups.com
On 18/11/2021 04:26, Bill Stewart wrote:
> On Tuesday, November 16, 2021 at 11:16:36 PM UTC-7 ViRazY wrote:
>
> Hello, I have a program I wanna install using the /SILENT or
> /VERYSILENT command line parameters, but it automatically launches
> after the installation, which I don't want.
>
> Inno Setup installers don't, by default, start an app after installing.
> (They can optionally be written to do so, of course, but this is at the
> discretion of the installer's author.)

Well, the "default" installation script generated by the wizard does do
so, but it also is configured to skip this automatically when run as silent.

But the installation author may have done it a different way instead;
you'll have to contact them directly with a feature request.

Bill Stewart

unread,
Nov 18, 2021, 3:02:02 PM11/18/21
to innosetup
On Wednesday, November 17, 2021 at 3:59:59 PM UTC-7 Gavin Lambert wrote:

> Well, the "default" installation script generated by the wizard does do
> so, but it also is configured to skip this automatically when run as silent.

Gavin is correct.

To clarify, there is a [Run] section in the wizard-generated script that runs the program automatically when installing interactively, but it uses the 'skipifsilent' option so the program is not started automatically if installing silently (good citizenship).

This would not be the case if you built the installer script "by hand" without using the wizard (unless, of course, you manually create the [Run] entry using the same code as the wizard would have generated for you).

> How would I go about figuring out whether or not it's using a task?

Possibly you can use the installer's /SAVEINF[1] command-line option to write the installation settings to a file, and then examine the file. (I don't remember whether this option outputs all possible tasks to the output file.)

ViRazY

unread,
Nov 18, 2021, 9:31:07 PM11/18/21
to innosetup
> Possibly you can use the installer's /SAVEINF[1] command-line option to write the installation settings to a file, and then examine the file.

From what I can tell, the output file doesn't seem to have anything useful in it:

[Setup]
Lang=en
Dir=(removed)
Group=(removed)
NoIcons=0
Tasks=

I suppose the best thing I can do is to contact the developers of the program and ask them to include "skipifsilent" in the [Run] section?

Bill Stewart

unread,
Nov 19, 2021, 2:29:10 PM11/19/21
to innosetup
On Thursday, November 18, 2021 at 7:31:07 PM UTC-7 ViRazY wrote:

I suppose the best thing I can do is to contact the developers of the program and ask them to include "skipifsilent" in the [Run] section?

Yes, or ask them to provide some other means of preventing the program from starting when installation completes.

Bill
Reply all
Reply to author
Forward
0 new messages