How to find out IBM WAS installations on a target machine

The installer program for IBM WebSphere Application Server uses the InstallShield MultiPlatform (ISMP) program to install the software. During the course of installation , ISMP maintains a record installed applications. In order to create a platform independent record maintenance , it uses a file named .nifregistry or vpd.properties to list program components that are currently installed. These files help ISMP and the installer program to recognize previous installations of WebSphere product family and control options for new installations. Lets try to find the footprints of Websphere products using nifregistry.
Sample entries of a .nifregistry :

<?xml version="1.0" encoding="UTF-8"?><!--Do not delete this file.  It is for IBM WebSphere Application Server internal use.-->
<nifregistry>

    <pak installrooturi="file:///C:/Program%20Files/IBM/WebSphere/AppServer/" name="was.cim.lang.zh.pak" paklocationuri="zip:///C:/Program%20Files/IBM/WebSphere/AppServer/properties/version/nif/backup/was.cim.lang.zh.pak" productid="BASE"/>
    <pak installrooturi="file:///C:/Program%20Files/IBM/WebSphere/AppServer/" name="was.cim.lang.zh_TW.pak" paklocationuri="zip:///C:/Program%20Files/IBM/WebSphere/AppServer/properties/version/nif/backup/was.cim.lang.zh_TW.pak" productid="BASE"/>
    <product installrooturi="file:///C:/Program%20Files/IBM/WebSphere/AppServer/" lastvisited="2012-08-02 04:10:44-0700" productid="BASE" version="7.0.0.0"/>

    <pak installrooturi="file:///C:/Program%20Files/IBM/WebSphere/AppServer/UpdateInstaller/" name="updi.primary.pak" paklocationuri="zip:///C:/Program%20Files/IBM/WebSphere/AppServer/UpdateInstaller/properties/version/nif/backup/updi.primary.pak" productid="UPDI"/>
    <product installrooturi="file:///C:/Program%20Files/IBM/WebSphere/AppServer/UpdateInstaller/" lastvisited="2012-08-07 23:16:13-0700" productid="UPDI" version="7.0.0.23"/>

</nifregistry>

For a particular product the .nifregistry file contains one entry (line) each for every PAK that gets installed and one entry (line) for the product offering (e.g. WebSphere Business Integration, Enterprise Service Bus etc.)

.nifregistry is an xml file will all entries enclosed in <nifregistry> tag.
Entries of product specific binaries (.pak files) enclosed in <pak> tag , followed by actual <product> tag. In the above sample we have 2 product tags for BASE and UPDI being installed. BASE is for IBM Websphere Application Server and UPDI is for IBM Websphere Update Installer.

<product> tag specifies the install location , productid and version of the product. <pak> tags are similar to the details of product specific jar (JAVA application)

Another important aspect of the nifregistry is it uses URL format for the install locations ... for eg : installrooturi="file:///C:/Program%20Files/IBM/WebSphere/AppServer/ includes %20 instead of a "space" and forward slashes in paths.
After uninstalling a particular product ISMP removes the necessary lines from the nifregistry.Location of the .nifregistry file varies with operating system , however the format of entries inside the file is constant and independent of operating system.

Operating SystemLocation of nifregistry
WindowsC:\Windows\.nifregistry
Linux/opt/.ibm/.nif/.nifregistry
AIX/usr/.ibm/.nif/.nifregistry
HP-UX/opt/.ibm/.nif/.nifregistry
Solaris/opt/.ibm/.nif/.nifregistry

Using the above data we can write a discovery code to find out all machines with Websphere family products installed.

Important Note: Starting Websphere Application Server 8 nifregistry is no more available. Instead one can use .was.installlocations.registry file located at the same location of .nifregistry as mentioned in the above table.

Related stuff : Deploying Webpshere Application Server using Tivoli Endpoint Manager (BigFix)

0 comments:

Post a Comment

+