Detect the version of WebSphere® Message Broker using registry entries.
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.
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.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ mqsi.studio\DisplayVersion = 5.x.x.xIn this example, x can be any integer.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ mqsi.ib\DisplayVersion = 5.x.x.xIn this example, x can be any integer.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ WMBT60\DisplayVersion = 6.x.x.xIn this example, x can be any integer.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ mqsi60\DisplayVersion = 6.x.x.xIn this example, x can be any integer.
Check for the presence of the files \Application Data\IBM\Installation Manager\installed.xml and \Application Data\IBM\Installation Manager\installRegistry.xml in your home directory. (The default home directory is C:\Documents and Settings\All Users: this setting might have a different value on your system.)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ mqsi61\DisplayVersion = 6.x.x.xIn this example, x can be any integer.
Linux® and UNIX platforms 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.
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.
To detect Version 6 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.
To detect Version 6 and later toolkits, look for the existence of /etc/IBM/WebSphereMessageBrokersToolkit/products/com.ibm.wbmt.
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
To detect Version 6 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.
Check for the presence of the files /var/ibm/InstallationManager/installed.xml and /var/ibm/InstallationManager/installRegistry.xml.