The delivery includes an installer (.exe) and the documentation. This page describes how to install it manually, and gives some examples to install it by scripting.
The M2M installer setup.exe must be launched, and the wizard steps must be followed to complete the installation.
To launch setup.exe, double-click on it, then follow the steps bellow:
Some examples of scripts that can be used to install and remove the M2M tool, are given here.
To be sure that the installer will work properly, you must take care to launch it as administrator.
The following script can be used to launch the installer in silent mode.
SET M2M_LICENSE_FILE=C:\M2M\license.lic SET OPTIONS=AgreeToLicense=Yes IS_BROWSE_FILEBROWSED=%M2M_LICENSE_FILE% setup.exe /S /V"%OPTIONS% /q/l log.txt"
To install a program as administrator from a batch file, the "start-process" powershell command can be used.
SET SETUP_PATH=%1 SET LOG_FILE=install.log SET M2M_LICENSE_FILE=C:\M2M\license.lic SET OPTIONS=AgreeToLicense=Yes IS_BROWSE_FILEBROWSED=%M2M_LICENSE_FILE% powershell -Command "Start-Process" -FilePath "%SETUP_PATH%\setup.exe" -ArgumentList '/S /V"""%OPTIONS% /q/l*v %LOG_FILE%"""' -Verb "RunAs" -Wait
To uninstall a program, it is easer to use msiexec tool with the product code of the program.
SET LOG_FILE=remove.log SET PRODUCT_CODE=09A75525-B8BB-40D6-80C7-8E63C6E5F473 msiexec /x {%PRODUCT_CODE%} /qb /l*v %LOG_FILE%
The M2MIE is installed by default at this location: C:\Program Files\SOWI\M2M_X.X.X\M2MIE, where X.X.X is the version number.
In order to integrate the tool inside Rhapsody, some junction directories are created in the <Rhp_instal_folder>\Share\Profiles folder.
It can happen in some specific context, that the installer has not the permission to create these junction directories. In this case, it is possible to create the links afterwards, by using the "mklink" DOS command:
Create a DOS script with the following script, and launch it with the necessary privilege to create the link in the Share\Profiles folder of your Rhapsody install.
SET TARGET="C:\Program Files\SOWI\M2M_X.X.X\M2M" SET LINK="C:\Program Files\IBM\Rhapsody\9.0.1\Share\Profiles\M2M" mklink /d %LINK% %TARGET% SET TARGET="C:\Program Files\SOWI\M2M_X.X.X\M2MIE" SET LINK="C:\Program Files\IBM\Rhapsody\9.0.1\Share\Profiles\M2MIE" mklink /j /d %LINK% %TARGET%
The M2M installer creates a new Windows environment variable "M2M_LICENSE_FILE". It contains the license file path or the license server address. If you need to modify the license location, you can modify the value of this environment variable.