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 Linux and UNIX systems

UNIX platforms do not have a common packaging method: you must check which files are present in the filesystem. Look for the files listed below for each version of WebSphere Message Broker that you want to detect.

MQSeries Integrator Version 2 runtime components

AIX platform 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 components

AIX platform 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 Linux and 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 components

Version 6 and later runtime components 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 toolkit

Version 6 and later toolkits 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. 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