I wanted to configure wpkg for a silent install of CDisplay, which is a free comic reader program. It allows images of pages that have been scanned from comics and stored in an ace, zip, rar, or tar file to be viewed by loading JPEG, PNG and static GIF images which are automatically ordered and presented for viewing one at a time or two at a time allowing one to read the electronic version in a manner similar to the paper copy.
I needed to have the program installed on a couple of PCs in my household and wanted to be able to install it on a system along with other software we commonly use by running wpkg.js from the server. My wife has scanned a good portion of her extensive comics collection and wants to be able to view them from any PC in the house.
That installer allows you to perform a silent install with the "/silent" or "/verysilent" options.
/SILENT, /VERYSILENT Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed but the installation progress window is. When a setup is very silent this installation progress window is not displayed. Everything else is normal so for example error messages during installation are displayed and the startup prompt is (if you haven't disabled it with DisableStartupPrompt or the '/SP-' command line option.
If you don't specify the "/SP-", option a window will appear with the question "This will install CDisplay. Do you wish to continue?", which will require a "yes" or "no" response.
You can specify the installation directory with the "/Dir=dir" option. So I put the following lines in the wpkg packages.xml file to install the software in "C:\Program Files\comics\CDisplay". If you specify a directory in which to install the program, rather than taking the default one, you do not need to ensure that higher level directories exist first. E.g., in the example below, the directory "c:\program files\comics" does not have to already exist, if %PROGRAMFILES% corresponds to "C:\Program Files". Both the "Comics" and "CDisplay" directory beneath it will be created.
The package section below, which should be placed in packages.xml, assumes version 1.8 of CDisplay is being used.
<package id="CDisplay" name="CDisplay" revision="1" reboot="false" priority="1"> <check type="uninstall" condition="exists" path="CDisplay 1.8" /> <install cmd='\\server\wpkg\pkg\comics\CDisplay\setup.exe /VerySilent /SP- /Dir="%PROGRAMFILES%\Comics\CDisplay"'> <exit code="0" /> </install> <remove cmd='"%PROGRAMFILES%\Comics\CDisplay\unins000.exe"' />
The remove command above will uninstall the software, but a prompt will appear on the system asking for confirmation. When I tried the "/silent" or "/verysilent" options for the unins000.exe command, the uninstall failed. It was successful when I did not use either of those options.
- Unattended, A Windows deployment system: Unattended/Silent Installation Switches for Windows Apps
- Inno Setup Command Line Parameters