Detecting Installed versions of WebSphere Message Broker

You can include, as part of your user-defined extension, code to detect the version of WebSphere Message Broker that is installed on a user's machine.

Detecting installed versions on Windows

You can use the following instructions in your installer scripts to test for the following versions of WebSphere Message Broker. To detect each version, look for the registry key given for each version.

MQSeries Integrator Version 2
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WebSphere MQ Integrator V2.1
WebSphere Business Integration Message Broker Version 5.0 toolkit
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\mqsi.studio\DisplayVersion = 5.x.x.x
In this example, x can be any integer.
WebSphere Business Integration Message Broker Version 5.0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\mqsi.ib\DisplayVersion = 5.x.x.x
In this example, x can be any integer.
WebSphere Message Broker Version 6.0 toolkit
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WMBT60\DisplayVersion = 6.x.x.x
In this example, x can be any integer.
WebSphere Message Broker Version 6.0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\mqsi60\DisplayVersion = 6.x.x.x
In this example, x can be any integer.

Detecting installed versions on UNIX

There is no common packaging method across UNIX platforms: you need to look at which files are present in the filesystem. You should look for the files listed below for each version of WebSphere Message Broker you want to detect.

MQSeries Integrator Version 2 runtime

You should check for the presence of /usr/opt/mqsi/bin/mqsilist. You should also check that /usr/opt/mqsi/bin/mqsiprofile and /usr/opt/mqsi/bin/mqsisetdbparms are not present.

On other UNIX systems:

You should check for the presence of /opt/mqsi/bin/mqsilist and make sure that opt/mqsi/bin/mqsiprofile and /opt/mqsi/bin/mqsisetdbparms are not present.

WebSphere Business Integration Message Broker Version 5.0 runtime

You should check for the presence of /usr/opt/mqsi/bin/mqsilist. You should also check that /usr/opt/mqsi/bin/mqsiprofile is not present.

On other UNIX systems:

You should check for the presence of /opt/mqsi/bin/mqsilist and make sure that opt/mqsi/bin/mqsiprofile is not present.

WebSphere Message Broker Version 6.0 runtime

Version 6 and greater runtime can be detected by looking for /var/mqsi/install.properties. Each line in this file contains a install path and V.R.M.F version information.

WebSphere Message Broker Version 6.0 tooling

Version 6 and greater tooling can be detected by looking for the existence of /etc/IBM/WebSphereMessageBrokersToolkit/products/com.ibm.wbmt.

To determine the version, you can use the following code example. Note that shell-script notation is used in this code: '-e' means if file exists.
if [ -e /etc/IBM/WebSphereMessageBrokersToolkit/products/com.ibm.webt  ]
  # Event Broker installed
      if [ -e `grep location /etc/IBM/WebSphereMessageBrokersToolkit/products/com.ibm.webt | sed 's/location=//'`/webt_prod/version.txt` ]
        # it is FP1 or greater
        get version from version.txt
      else
        #version is 6.0
      fi
    fi
  if [ -e /etc/IBM/WebSphereMessageBrokersToolkit/products/com.ibm.wmbt ]
    # Message Broker installed
    if [ -e `grep location /etc/IBM/WebSphereMessageBrokersToolkit/products/com.ibm.wmbt | sed 's/location=//'`/wmbt_prod/version.txt` ]
      #It is FP1 or greater
      get version from version.txt
    else
      #version is 6.0
    fi
  fi