Detecting installed versions of WebSphere Message Broker

A user-defined extension can detect which version of WebSphere® Message Broker is installed.

Use the conditions described here to test for particular version or versions. If expected conditions are not met, a component might not have installed correctly, or might have become corrupted. Check the status of the installed component and the local logs to identify and resolve any errors.

Detecting installed versions on Windows

Use the following instructions in your installer scripts on Windows® to test for the following versions. To detect each version, look for the registry key given for each version. In the examples shown, x can be any integer.

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
WebSphere Business Integration Message Broker Version 5.0 runtime components
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
mqsi.ib\DisplayVersion = 5.x.x.x
WebSphere Message Broker Version 6.0 toolkit
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
WMBT60\DisplayVersion = 6.x.x.x
Start of changeWebSphere Message Broker Version 6.0 runtime componentsEnd of change
Start of changeOpen the file install.properties in the working directory.

The default working directory is %ALLUSERSPROFILE%\Application Data\IBM\MQSI where %ALLUSERSPROFILE% is the environment variable that defines the system working directory. With the default value of %ALLUSERSPROFILE%, the working directory is C:\Documents and Settings\All Users\Application Data\IBM\MQSI. The actual value might be different on your computer; use %ALLUSERSPROFILE% to ensure that you access the correct location.

Each line in the file is of the following format:

PATH_TO_INSTALLATION = VERSION_OF_INSTALLATION

For example, if you have installed Version 6.0 Fix Pack 5 in the default installation location, the line contains the following text:

C\:\\ Program\ Files\\IBM\\MQSI=6.0.0.5

The backslash character \ is interpreted as an escape character. It is inserted before each non-alphabetic and non-numeric character in the string to preserve the character. A colon, a space, and several backslash characters are escaped in this example.

Parse each line of the file to detect all the installed versions and the directory paths for the runtime components, and ignore all duplicates and non-existent directories.

End of change

Detecting installed versions on Linux and UNIX systems

Linux® and UNIX® systems do not have a common packaging method: you must check which files are present in the file system. 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 Check for the presence of /usr/opt/mqsi/bin/mqsilist and check that /usr/opt/mqsi/bin/mqsiprofile and /usr/opt/mqsi/bin/mqsisetdbparms are not present.

On other Linux and UNIX systems, 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 Check for the presence of /usr/opt/mqsi/bin/mqsilist. Also check that /usr/opt/mqsi/bin/mqsiprofile is not present.

On Linux and other UNIX systems, 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 toolkit

To detect Version 6 and later toolkits, look for the existence of /etc/IBM/WebSphereMessageBrokersToolkit/products/com.ibm.wbmt.

To determine the version, 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
	
WebSphere Message Broker Version 6.0 runtime components

To detect Version 6.0 and later runtime components, look for the file /var/mqsi/install.properties. Each line in this file contains an installation path and V.R.M.F version information.

Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:23:06

as04530_