0

I have a installer for my program that has been built using INNO Setup. I want to convert this installer to silent installer/unattended installer, such that the user doesn't have to enter anything and the files gets extracted to a predefined location.

I have done my homework and found out that it can be done via command line parameters, but I don't expect my user to go through all the pain.

I just want an exe, which on double click should install my application. Is it possible to enter some parameter in the INNO script to make the installer as silent ? (I didn't find any pointers to this)

Any help is appreciated :)

ItachiUchiha
  • 36,135
  • 10
  • 122
  • 176
  • 1
    TLama answered such question here: [how-to-make-the-silent-installation-by-using-innosetup](http://stackoverflow.com/questions/21575241/how-to-make-the-silent-installation-by-using-innosetup) – RobeN Feb 13 '14 at 08:54
  • @RobeN But Chrome has a silent installer and it runs perfectly without being marked as a malware – ItachiUchiha Feb 13 '14 at 08:59
  • Chrome installer still asks the user if they would like to install – Jerry Dodge Feb 13 '14 at 09:04
  • @JerryDodge there is a silent installer for chrome, which doesn't require administrative rights. Just double click on it, it extracts the file to some folder, creates a desktop icon and launches itself ! – ItachiUchiha Feb 13 '14 at 09:10
  • You can also make an installer without need for elevation. And you can make it silent as I've shown. But I'm afraid that antiviral software will mark it as suspicious because of that re-run. But as usually you have at least two options, either you'll re-run the setup with the `/SILENT` parameter or build your own Inno Setup which will run silent without any command line parameter. – TLama Feb 13 '14 at 09:36
  • @TLama Thanks for the reply. I'll actually try the script that you have supplied and see what happens. I was just wondering, how do these professional/commercial silent installers are so efficient and there must be a way to do it, because they exists – ItachiUchiha Feb 13 '14 at 09:56
  • Well, the proper way would be to build your own Inno Setup version which would directly run itself as silent. I doubt that any security software would take this behavior as suspicious. Programs doesn't need to interact with the users to be taken as trusted. – TLama Feb 13 '14 at 10:01
  • @TLama just the way you showed in your answer in other post, right ? – ItachiUchiha Feb 13 '14 at 10:06
  • 1
    Setup with my script from there might be taken as suspicious for some AVS. But might be not. I don't know :-) What I know is that you can either use [`that script`](http://stackoverflow.com/a/21577388/960757) or build your own Inno Setup. There is no native way, no such directive, which would switch the Inno Setup to be silent when running without command line params. – TLama Feb 13 '14 at 10:14
  • @TLama thanks for the inputs :-) You have made life much easier for me – ItachiUchiha Feb 13 '14 at 10:14
  • Beware that a self running installer breaks any of the `...AsOriginalUser` functionality. You can rerun it with `ExecAsOriginalUser` but then it will require elevation again. – Deanna Feb 13 '14 at 10:15

1 Answers1

2

You should change your requirement.

It doesn't matter whether AVS declare it as suspicious or not, users will in general consider something malware if it performs drive-by-installs without letting them know about it. It is not "hassle" for users to confirm they want to install when they run the installer -- and that is all that Inno requires for a non-silent install.

You can skip every page in Inno except one in a non-silent install. You can decide whether that one is the welcome page (just shows general intro text), the ready page (shows information about where it will be installed), the dir selection page (to let them choose where to install), or even a custom page. Inno doesn't mind which single page you want to show, as long as you show at least one.

The only case where it is acceptable to jump straight to "installing" without any preamble is when the installer is being run from another program at user request (eg. your application found an updated version of itself, asked the user if they wanted to install it, then downloaded and ran the installer). In this case, the parent application should be using the command line to request a silent install.

Miral
  • 12,637
  • 4
  • 53
  • 93