#StandWithUkraine

Simplify software installations with silent routines

I like when things just click and work, but some take me months (years) and few approaches (four seems to be magic number) to figure out properly. Curiously it is more about finding easy ways than implementing hard.

Unattended/silent installations minimize amount of unnecessary clicks in software setups and make them fast and convenient.

What it does

Unattended installation is a process of installing software without need of user input. Basically it gets rid of stupid next-next-next-finish we all know and hate.

Silent installation is basically unattended installation that doesn’t display anything. It is better for background installs over network and such. For personal purposes it equals unattended one.

I am more used to term silent (and it is shorter to type) so I will stick with it.

To launch silent installs in most cases means addition of command line switches to setup executable. With classic being:

setup.exe /silent

Why bother

Using such types of installation saves many clicks and even more time because you can queue multiply installs instead of waiting for one to finish to start another.

Usual way

Unattended installations go hand in hand with complex obscure deployments tools and whole scripting languages (AutoIt was originally tool developed for this). This was what I fumbled with in early attempts and frankly I am glad things moved on to the point where we can get benefits of silent installs in simpler ways.

Nowadays most of software use common third party installers, which mostly come with their own silent switches. Portable is on the rise as well and while it lacks installation itself it is as easy to deploy.

Mainstream bulk packages had recently got some press. As for me they will be plagued by some distribution issues that kill most of portable bundles and if apps you need aren’t included that makes bundle useless overall.

Knowledge repositories

While software docs and site are natural first step, in many cases silent routines are poorly documented.

Many projects (mostly offering abovementioned bulky tools :) manage repositories of information on silent installs for software. Those I found most useful:

Figure out installers

If there is no readily available information you can try to figure out type of installer used and look up generic switches for it.

You can try TrID or simply file properties (Alt+Enter on file):

silent_install_properties

silent_install_properties

Unattended project page on installers has excellent write-up on common installers, signs that they are used and their silent switches.

“Install” portable

Portable may actually have first launch install routine, but mostly it doesn’t bother – and that’s the point. Some people find a flaw in lack of installation and un-installation functions, as for me it is easily remedied.

Un-installation is easy – just delete folder. :)

As for installation – if you have archive it is always easy to unpack it. It will require command line as well, but only as much as more complex silent installs. This method is also suitable for installers that are actually simple self-extracting archives.

For example with 7-Zip you can do following:

7z.exe x program.zip –o”C:\Program Files\” -y

This will unpack archive into Program Files (add sub-folder if needed) and suppress overwrite prompts.

Manage and update setup packages

I had previously covered Ketarin, which is excellent tool to keep setup packages updated. It allows to keep your own repository and minimize overhead of dealing with updates.

For local usage you can also make it perform automated silent install when packages are updated. You can set variables (such as path to 7-Zip) and combine with native ones (like {file} for current package) to use in command that is run after update detected and downloaded.

silent_install_ketarin_command

silent_install_ketarin_command

Deploy setup packages

Copy/paste is not too shabby. :) Still my setup packages organization tries to minimize number of folders, so getting just right set of files to copy got tedious.

This is command line script I came up to copy files from flash drive or external hard drive. Quite robust (thanks to robocopy) and easy to manage:

robocopy _<a href="https://www.rarst.net/software/ccleaner/">CCLeaner</a> d:\Install\_CCleaner /s /purge
robocopy _<a href="https://www.rarst.net/software/revo-uninstaller/">Revo</a> d:\Install\_Revo /s /purge

robocopy . d:\Install\ _Autoruns.exe "_Process Explorer.exe"
_<a href="https://www.rarst.net/software/spacesniffer/">SpaceSniffer.exe</a> 7z465.exe AdbeRdr*.exe "avast setup.exe"
"avast vpsupd.exe" cdbxp_setup_*.exe CrossloopSetup.exe dotnetfx35.exe
dtlite*.exe "Firefox*.exe" install_flash_player_10.exe
install_flash_player_10_active_x.exe jre-*.exe MyDefrag*.exe Opera_*.exe
Paint.NET.3.5.Install.exe picasa*.exe IE8-WindowsXP-x86-ENU.exe
K-Lite_Codec_Pack_*_Full.exe klcpf.ini setup.cmd

7z.exe x directx_aug2009_redist.exe -od:\Install\directx\ -y
del /q d:\install\cureit\*.*
7z.exe x <a href="https://www.rarst.net/software/choosing-portable-antivirus-clamwin-vs-cureit/">cureit.exe</a> -od:\install\cureit\ -y

It copies over core packages. Some as portable folder, some as install executable and some are unpacked on the fly. Packages that are changed often are described with masks, so they script doesn’t need to be updated each time.

Bulk installation

Now that packages are neatly stacked in local folder it is just one more script to install them in bulk.

<a href="https://www.rarst.net/software/common-frameworks-you-may-want-installed/">dotnetfx35.exe</a> /passive /norestart
.\directx\<a href="https://www.rarst.net/software/common-frameworks-you-may-want-installed/">dxsetup.exe</a> /silent
IE8-WindowsXP-x86-ENU.exe /passive /update-no /no-default /norestart
<a href="https://www.rarst.net/software/common-frameworks-you-may-want-installed/">jre-6u17-windows-i586-s.exe</a> /s /v "/qn [REBOOT=Suppress]"
<a href="https://www.rarst.net/software/7zip/">7z465.exe</a> /S
AdbeRdr920_en_US.exe /msi /norestart /quiet
<a href="https://www.rarst.net/software/cdburnerxp-burning-discs/">cdbxp_setup_4.2.7.1801.exe</a> /SILENT /SP- /NORESTART
<a href="https://www.rarst.net/tag/opera/">Opera_1001_int_Setup.exe</a> /S /v"/qn"
<a href="https://www.rarst.net/software/common-frameworks-you-may-want-installed/">install_flash_player_10.exe</a> /s
<a href="https://www.rarst.net/software/common-frameworks-you-may-want-installed/">install_flash_player_10_active_x.exe</a> /s
<a href="https://www.rarst.net/tag/klite/">K-Lite_Codec_Pack_544_Full.exe</a> /silent /norestart /LoadInf=".\klcpf.ini"
<a href="https://www.rarst.net/software/mydefrag/">MyDefrag-v4.2.6.exe</a> /SILENT /SP- /SUPPRESSMSGBOXES /NOICONS
<a href="https://www.rarst.net/tag/paintnet/">Paint.NET.3.5.Install.exe</a> /auto
picasa35-setup.exe /S /L
<a href="https://www.rarst.net/software/crossloop/">CrossloopSetup.exe</a> /SILENT /SP-
"avast setup.exe" /SILENT /SP- /NORESTART
"avast vpsupd.exe"
shutdown -r -t 60

It doesn’t make effort to use silent keys, only unattended so progress is visible. For apps, that try to reboot computer when done, there are keys that suppress reboot. There is only single explicit reboot in the end for freshly installed stuff to settle in.

Such routine will not handle precise details (like file associations) but as for me those take unreasonable time to setup and manage. Who knows, maybe in few more years. :)

Overall

While there are powerful and complex deployment tools for large scale, they are overkill for more personal level. On other hand even with basic tools and minimal amount of scripting it is possible to greatly streamline software updates and installations.

Related Posts

7 Comments

  • Rush #

    Good read, Rarst. I drove myself crazy when I was first trying to figure out the s/u installs. After finally getting all the commands down for the different installers, I torpedoed the whole endeavor. The main thing I found in these silent installs is that sometimes, not always, there is no option to install without the bs add-ons like yahoo toolbar or avoid homepage switching, etc. For me, it's easier to talk someone through the next> situation than answer the phone at 2am because my Mom cant figure out what happened to her homepage. U/S installs are great for large deployment packages and operators with some level of skill, but my bright idea to use them as a package installer for the non tech savvy..... not so much.
  • Rarst #

    @Rush Yeah, giving this setup to family probably won't work too well. :) For remote stuff I am thinking about addition of fetching files from my HFS file server so I can connect to remote PC with CrossLoop, launch install routine and keep an eye on it. For home page hijacks I encountered by chance cool Opera super setup that is great for settings lockdown.
  • Reynold #

    Nice one Rarst, kinda got a idea that ill be able to make my own silent package installer... im working with lots of computers and it sucks to install all the same things. Cheers mate!
  • Rarst #

    @Reynold I am not dealing with large quantities of computers lately, but for myself I integrated quite a bit of silent stuff with Ketarin for some realyl seamless install and updates. For many apps feels close to that Linux experience when you just say it to update and it does it like magic.
  • May #

    picasa 3.8 install /S /L did install but the windows installer help screen keep popping up, have to click OK for the install to complete. Is there any option that will stop the installer help screen from popping up? Thank you.
  • Rarst #

    @May Sorry, no idea. Quick search doesn't find any new keys for Picasa - same /S /L are being recommended.
  • Stephane #

    try soft2base. It contains picasa 3.9 ans most softwares named here. You can install silently (or not), select languages etc. Its list is kept up to date so that you don't need to re-download the exe each time.