Blonde Guy

Home Consulting Products Technical Notes Blonde Joke Contact

Unattended Installation using WarpIN

WarpIN is a great installer for OS/2. Applications using the WarpIN installer gain an uninstall, and the functionality of the WarpIN database.

Most users only need to know how to use WarpIN from its graphical user interface. Just click on the archive, and the installer runs. Just click on WarpIN to uninstall any program that has been installed by WarpIN. This essay is intended to help those who wish to automate WarpIN, or to use it from command line and a text editor.

I have incorporated unattended install functionality for WarpIN into Suntan Special version 0.50 and higher. This allows me to install WarpIN and any application which uses WarpIN to directories of my choice with no user input. Of course, I must have previously defined my choices in Suntan Special settings.

WIC, the WarpIN Command Interface

The core functionality of unattended installation using WarpIN is in the WIC.EXE program. WIC has many uses, but I am focusing here on unattended installation. WIC can install an WarpIN archive using a previously saved CID (Configuration, Installation, Distribution) file, which is an XML-like file with the extension .XCD. Some WarpIN archives cannot be installed using this method; those with active REXX code must use an alternate method.

Here is the help for WIC.EXE; a much more complete description of the parameters is given in the WarpIN Programmer's Guide and Reference, which is installed in the WarpIN folder.

wic V1.0.6 Apr 22 2005 - WarpIN Command Interface
(C) 1998-2005 Jens Bäckman, Ulrich Möller, Yuri Dario, Paul Ratcliffe
Syntax: wic <arc> -<mode> <params> [@paramfile]
The different <modes> are (type "wic -h<mode>" for details):
Add files (-a):
    wic <arc> -a {<pckno> [-r] [-c<dir>] <mask>...}... [-u[<exe>] | -U[+]] [-v]
    Adds the files in <mask> to decimal <pckno> in archive <arc>.
Delete packages (-d): wic <arc> -d <pckno> [<mask>]
    Deletes files from the given archive.
Set installation script (-s): wic <arc> -s <file>
    Sets <file> as the install script for archive <arc>.
Test installation script (-t): wic -t <file.wis>
    Loads and tests the specified script file for integrity.
List packages (-l): wic <arc> -l [<pckno>]
    Lists the files in <pckno> in <arc>; without <pckno>, a summary is shown.
Extract files (-x): wic <arc> -x {[<pckno>] [<mask>]}...
    Extracts files from the given archive.
Extract script (-X): wic <arc> -X [<filename>]
    Extracts the archive's script into the given <filename>.
Query database (-q): wic <arc> -q
    Compares the given archive against the database.
Install archive (-i): wic -i <cid.xcd>
    Installs an archive using an XML CID script.

By using the -i option, WIC can perform an unattended install. The parameters of the install are supplied in the XML CID script.

Creating the XML CID script

To create such a script, run WarpIN up to the page where the directory is selected. It does not matter if the directory is greyed out, at this stage. From the WarpIN window, select the menu item Archive->Create CID File...

An example of an XML CID script created in this way is given below.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE warpincid SYSTEM "warpincid.dtd">

    pckid="OS/2 Netlabs\WarpIN\Base\1\0\6"/>
    pckid="OS/2 Netlabs\WarpIN\Extras\1\0\6"/>

The source directory for the archive is specified in by the filename parameter in the archive part. The target directories for each feature of the product are specified by the path parameter in the job part. It is a simple matter to edit the CID file with a text editor or with an automated source parsing tool.

It does not appear to matter if the archive is a .WPI intended to be executed by the end-user's copy of WarpIN or a .EXE self-installing archive. WIC.EXE installs either of them by this method.

WarpIN appears to do both initial installations and upgrades from the same script. According to the Programmer's Guide and Reference, these restrictions exist for WIC.


Suntan Special
A product that transforms your computer into a well-equipped workstation with some of the best applications available.

OS/2 Technical Notes
25 Topics including installation, configuration, software development and web applications

The WarpIN web-site, hosted by OS/2 NetLabs