Unattended XPCD

Inno Setup
Submitted by Alanoll

» How do I find out if a setup package is made by Inno Setup?

The first window that appears is usually the one shown above on this page, followed by the window shown below (click on the icon in the top-left to get a drop-down menu and click on About Setup)

Unattended XPCD

The following programs can be used to determine type of installer and the command line options.

» Switches

Applications packaged with Inno Setup supports the /SILENT and /VERYSILENT switches. /SILENT only displays a progress bar while /VERYSILENT doesn't display anything at all.

setup.exe /VERYSILENT

You might get this dialog window asking if you want to continue installation:

Unattended XPCD

We can simply get around that using the following switch instead:

setup.exe /VERYSILENT /SP-

Some Inno Setup installers will attempt to open the program when setup completes, ISOBuster is one example of doing this. Again, we can simply overcome this by using an in-built utility in Windows XP known as Taskkill.

Below is an example of code you could use in a batch file to install an application that uses Inno Setup:

ECHO Installing ISOBuster 1.4
ECHO Please wait...
start /wait %systemdrive%\install\Applications\ISOBuster\IsoBuster14.exe /VERYSILENT /SP-
ECHO Killing ISOBuster.exe process
taskkill.exe /F /IM isobuster.exe

This works fine if you will only be installing on Windows XP systems as taskkill isn't available in Windows 98 or 2000. For Windows 98 and 2000 users you can download pskill.exe from the Sysinternals web site and include it in the same folder as Inno setup file. Then replace the taskkill.exe /F /IM isobuster.exe with "%~dp0pskill" isobuster.exe. Note that within a batch file %~dp0 expands to the drive letter and path of the batch file including the trailing backslash and I've included quotes around the command incase there is a space in the path.

Some Inno installers reboot the system. This can be prevented by using the /NORESTART option.

You can change the installation directory using the /DIR switch. Don't forget the hyphens (").
%systemdrive%\install\Applications\ISOBuster\IsoBuster14.exe /DIR="c:\installation path"

You can find more switches on this GnuWin32 page.

» Using INF files to save settings

Inno installer lets the end user saves his installation settings in an inf file and reuse them later.
Use /SAVEINF="filename" and install your application normally.
You can now use the /LOADINF="filename" switch to load installation settings. When /LOADINF is used, Inno installer will check the whole command-line too.

» How do I modify an application built with Inno?

For some Inno applications you will need to rebuild the installer to make it install silently.

The Inno installer is freeware so a user can easily repackage an Inno application if needed. To do this you need Inno Setup Unpacker to extract the files and Inno Setup to modify the install script and recompile the application. The documentation is included with the Inno Setup application.

Here is an example: Rebuilding Inno Setups, e.g. SpywareBlaster

» How do I install select components and perform certain tasks?

The Inno installer supports the /COMPONENTS and /TASKS command line options which you can use to install a selected group of components and perform (or not perform) selected tasks. To see what is available in the installation package, use the Inno Setup Unpacker with the -m option to extract the setup system hidden files. There will be a file with a .iss extension that will have the data that you will need.

An example command line for spybot162.exe that will install ONLY the components main, language, and skins.
START /WAIT %SOFTWAREDIR%\%NAME%\spybotsd162.exe /components="main,language,skins"

Another example for spybot162.exe that will not create a desktop icon. The ! tells the installer to not perform that task. The same logic holds true for the component list.
START /WAIT %SOFTWAREDIR%\%NAME%\spybotsd162.exe /tasks="!desktopicon"

Last updated 2009-04-21 18:17:35 by Maelstorm  [Edit]
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001 - 2015 msfn.org
Privacy Policy