NSIS installers are generated by using the 'MakeNSIS' program to compile a NSIS script (.NSI) into an installer executable. The NSIS development kit installer sets up your computer so that you can compile a .nsi file by simply right-clicking on it in Explorer and selecting 'compile'.
There are many different installer types out there, each with their own ways of handling silent installs. The information below is an attempt to cover the options that would be used in a typical campus install in SCCM. General information about a number of them can be found on the following page:
Nullsoft Installer Switches
I have an NSIS installer executable which I would like to install silently for all users. I know I can pass the /S argument to do a silent install. The problem is that the default option for the installer is to install only for the current user. How can I change this option from the command line:
If the custom page from your screenshot was created with MultiUser.nsh and the author defined MULTIUSER_INSTALLMODE_COMMANDLINE then you could use installer.exe /AllUsers /S, otherwise you have to ask the author of the installer if they are checking for a specific command line switch.
The goal of this document is to collect instructions for performing unattended / silent installations of many popular application installers. Such instructions are useful for automating these installations.
There are several systems which vendors use to create installers for their applications. To make an educated guess about how to run an installer unattended, you need to know which system was used to create it. Sometimes this will be obvious from the installer's splash screen; sometimes you can figure it out by running strings; and sometimes you will have to guess.
Of course, you can try running the installer with the /? switch to find out which other switches it supports. But if you really expect this to work, then you have not been using Windows for very long. In my experience, the odds are about 1 in 4 that /? will tell you anything at all, even when there is something to tell.
For installation, use the /i and /qb switches. Use the /l* switch to produce a log file. You can provide named options (or "properties") at the end of the command line; which properties are supported depends on the package. For example, this command:
To perform a silent installation, you need an InstallShield "answer file", customarily named setup.iss. Some applications ship with such a file, but if yours does not, you can use the graphical installer itself to create one.
Here is how it works. Run the installer with the /r ("record") switch. Proceed through the dialogs and complete the installation. This will create a setup.iss file and place it in the C:\WINDOWS directory (yes, really). This file will include all of your responses to the InstallShield dialogs, allowing you to perform unattended installations as if you were giving the same answers again. Simply copy setup.iss to the same directory as the installer executable.
Unfortunately, the installer will fork a separate process and exit, meaning it will return immediately even if you run it under start /wait. This makes it useless for scripting purposes. Luckily, there is another switch, /sms, which will cause the installer to pause until the installation completes.
Oh, one more thing. The /r and /s switches only work if the release engineer is competent. Many packages have "custom dialogs" which are not supported by setup.iss, which means the dialogs will always appear no matter what you do. For such packages, I suggest asking the vendor to fix their installer. If that does not work, I suggest doing what you can to deprive them of business.
The PFTW package recognizes the /s and /a ... switches. The /s switch instructs the PFTW package to run silently, although this does not necessarily mean that the underlying setup.exewill run silently.
The /a ... ("add") switch allows you to add switches to the command line of the underlying setup.exe process. You may provide any of the normal InstallShield switches here, including /r, /s, and /sms.
These MSI files may be shipped alone or with a setup.exe installer. These installers in turn come in two flavors, called "InstallScript MSI" and "Basic MSI". InstallScript MSI uses the traditional InstallShield switches. Basic MSI is another story.
To perform an unattended installation using a Basic MSI installer, you provide the /s /v"..." switches, where ... represents any additional switches you want to pass down to msiexec. These should include the /qb (or /qn) switch to make the installation non-interactive, so a minimal invocation would be:
The first /s tells the PFTW installer to extract silently. The /a tells it to provide the remaining switches to the underlying setup.exe. The second /s tells setup.exe to run silently, while the /v"/qb" tells it to pass /qb to msiexec, which causes msiexec to run non-interactively but display a basic interface.
InstallMaster installers are supposed to recognize the /s switch to perform a silent installation. And in our experience, they generally do. But there is no way to set options, and the exit status is meaningless.
When an NSIS installer runs, it creates a little window which says verifying installer: N%, where N counts from 0 to 100. So you can recognize these installers by this behavior. (Actually the verification procedure is optional, but most installers have it enabled. As an alternative, you can run "strings" and grep for "NSIS").
NSIS installers recognize /S for silent installation, /NCRC to suppress the CRC (verification) step, and /D=dir to specify the "output directory", which is where the program will be installed. These options are case-sensitive, so be sure to type them in upper case.
Incidentally, all /S does is change the installer script's SilentInstall attribute from "normal" to "silent". What effect this has, exactly, depends on the person who wrote the script. If /S does not perform a silent install, consider submitting a bug report to the installer's creator.
Ethalone's Ghost installer is just another commercial product, available in free and commercial editions. The free edition is nothing but the compiler, which takes XML files; the commercial edition is the compiler plus a graphical editor and wizard to create these XML files.
Some hotfixes use an old Microsoft packaging technology called "IExpress", whose switches are more-or-less documented in KB article 197147 and an old USENET post. These installers first extract some stuff to a temporary folder and then run a command from inside that folder. They support the /t:path switch to specify the temporary folder name and the /c:command switch to specify the command to run. Specifying just /c suppresses running the command at all, so you can use /c /t:path to extract the hotfix just to look at it.
There are several tools around which can take a snapshot of a machine's state before and after a manual installation, compute the differences between the states, and bundle them up as an "installer". The Wise product line provides good support for this, and Microsoft's free tool provides bad support for it.
The problem with this approach is that it fundamentally cannot work reliably. An installer's behavior may depend on the exact initial state of the machine, such as the OS version or the presence/absence of other installed software. So the repackaged installer will almost never do exactly the same thing that a fresh installation would, unless the target machine is completely identical to the original machine.
AutoIt is a free tool which can simulate key presses and mouse clicks, following a script customarily named with a .aut or a .au3 extension. Most installers have a sufficiently simple and consistent interface that a very short AutoIt script suffices to automate their installation.
More worryingly, AutoIt scripts are theoretically unreliable because they do not let you determine when a sub-process has exited. You can tell when AutoIt itself exits, but that is not the same thing at all. For example, an installer's last window might disappear while the installer was still working. Your master script, waiting only for the AutoIt executable, would then proceed, starting another installation or rebooting the machine.
In practice, it does not matter much, because most installers do finish their work before destroying their last window. Just make sure your .aut script uses WinWaitClose to wait for that last window to vanish.
This is the 3rd of my Packager-Specific Tips & Tricks articles.Nullsoft Scriptable Install System (NSIS) is a free installer by Nullsoft, the creators of Winamp.It creates self-contained EXE packages.
Common command line parameters for installers built using the NSIS are: /S runs the installer or uninstaller silently. /D sets the default installation directory. It must be the last parameter used in the command line and must not contain any quotes,...
There are different installer types for different EXEs with different silent installer switches. For some programs, you need to know more than just the normal silent install switch, but also how to specify some required parameters as well.
If I am working with a new EXE installer and I do not know the type, I upload it to and it will give me an analysis of the file, which typically includes the type. If I cannot upload it to due to size or security reasons, then I use TrID, ExifTool, or hachoir_metadata.
NSIS (Nullsoft Scriptable Install System) is a professional open-source tool for the development of Windows installers. It is designed to be as small and flexible as possible and is therefore highly suitable for internet distribution.
NSIS (Nullsoft Scriptable Install System) is an open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.
Using NSIS, you will be able to repackage your installers that have multiple files into a single, highly compressed executable. Your installers will complete faster, and consume less bandwidth. You will also be able to script administrative changes to your machines, such as deploying a standard desktop, or updating a specific registry value, or deploying an in-house application. 2ff7e9595c
Comments