Bug #22731 Agent Install on Windows does not work correctly unattended mode (br 1706)
Submitted: 27 Sep 2006 9:00 Modified: 24 Oct 2006 14:09
Reporter: Carsten Segieth Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Installing Severity:S2 (Serious)
Version:0.6.24, 0.6.33 OS:Windows (Windows)
Assigned to: Keith Russell CPU Architecture:Any

[27 Sep 2006 9:00] Carsten Segieth
Description:
It is not possible to start the BitRock agent installer in unattended or text mode. Regardless which options (see below for options available on non-Windows systems) are used - nothing happens.

Using a command as it is possible on Linux does not work, also there is no 'help' functionality for the installer available. Using 

 mysqlserviceagent-0.6.24-windows-installer.exe -help

an error message for the TclKit is shown.

How to repeat:
start mysqlserviceagent-0.6.24-windows-installer.exe using one or more of the options shown below.

Suggested fix:
make command line options available like already possible on non-Windows systems, like:

mysqlserviceagent-0.6.23-solaris10-sparc64-installer.bin --debugtrace /users/csegieth/mysqlnetworkagent-0.6.23/$HOST/install.log --prefix /users/csegieth/mysqlnetworkagent-0.6.23/$HOST --mysqlhost win2003a-x86 --mysqlport 3307 --mysqluser agent --mysqlpass mysql --merlinhost net-qa2 --merlinport 8080 --merlinuser agent --merlinpass mysql --merlinservername "$HOST - win2003a-x86" --loglevel debug  --mode unattended
[28 Sep 2006 15:12] Keith Russell
Reply from Bitrock:

It is possible, you can find more information about this on the below URL: http://www.bitrock.com/support_installbuilder_faq.html#A2_3

In this particular case you can invoke:

mysql-service-agent.exe --mode unattended --mysqluser user --mysqlpass password --merlinpass password2 --merlinservername name

to pass additional parameters to the installer. Bear in mind, however that the Windows installer application  is not a Win32 console application and by default the stdout will not be printed in the terminal, you may need to redirect it to a file > log.txt 

You can also use  --optionfile mysql.options  and include the following in a file named mysql.options:

mysqluser=user
mysqlpass=password
merlinpass=password2
merlinservername=name
[11 Oct 2006 11:30] Carsten Segieth
0.6.33 - unattend install of a Merlin Agent does not work correct on Windows.

The unattended install starts and installs the software, but most files are installed to a wrong place.

I used a .cmd file and an option file like shown below. It seems, that the install uses the 'prefix' value only for the uninstall.exe and not for the product files! This value works correct for agent installs on Linux and for a server installs on Windows. As I didn't test the server install on Linux, so I'm not sure whether it works there, too. 
The uninstall.exe is created correct in the dir that is specified in 'prefix', the debugging file is created as specified, but are all other files are copied to the default path and not to the path specified in 'prefix':

 Verzeichnis von C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0

2006-10-11  12.13    <DIR>          .
2006-10-11  12.13    <DIR>          ..
2006-10-11  12.13           126.079 install.debugtrace.log
2006-10-11  12.13         2.110.162 uninstall.exe

 Verzeichnis von C:\Programme\MySQL\MySQLNetwork

2006-10-11  12.12    <DIR>          .
2006-10-11  12.12    <DIR>          ..
2006-10-11  12.13    <DIR>          Agent

 Verzeichnis von C:\Programme\MySQL\MySQLNetwork\Agent

2006-10-11  12.13    <DIR>          .
2006-10-11  12.13    <DIR>          ..
2006-10-11  12.12               299 agentctl.bat
2006-10-04  22.03           888.832 iconv.dll
2006-10-04  22.03            45.056 intl.dll
2006-10-09  22.10             4.984 items-mysql-network.xml
2006-10-09  22.10             2.267 items-os.xml
2006-10-09  22.10             7.233 items-slavestatus-mysql-4.1.6.xml
2006-10-09  22.10            47.301 items-status-mysql-5.0.11.xml
2006-10-09  22.10            45.276 items-variables-mysql-5.0.11.xml
2006-10-04  22.03           237.568 libcurl.dll
2006-10-04  22.03           662.998 libglib-2.0-0.dll
2006-10-04  22.03            36.661 libgthread-2.0-0.dll
2006-10-04  22.03           876.032 libxml2.dll
2006-10-09  22.00         1.327.104 mysql-service-agent.exe
2006-10-11  12.13               604 mysql-service-agent.ini
2006-10-04  22.03               894 mysql.ico
2006-10-04  22.03            59.904 zlib1.dll
2006-10-04  22.03            74.240 zlibwapi.dll

-----------------------------
    install.agent.cmd
-----------------------------
if .%1 == . goto :default
   set VERS=%1
   goto :install
:default
   set VERS=0.6.33
:install
mysqlserviceagent-%VERS%-windows-installer.exe --optionfile options.agent.txt

-----------------------------
content of options.agent.txt
-----------------------------
debugtrace=C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\install.debugtrace.log
mode=unattended
prefix=C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0
mysqlhost=127.0.0.1
mysqlport=3300
mysqluser=root
mysqlpass=merlin
merlinhost=127.0.0.1
merlinport=8080
merlinuser=agent
merlinpass=mysql
merlinservername=Merlin on VMXP
loglevel=debug
[18 Oct 2006 3:39] Keith Russell
update in version 7.4
[18 Oct 2006 11:49] Carsten Segieth
the problem still exists with newst build (0.7.4) and with the same optionfile (except of the removed line log-level=...), there are no differences in the behaviour.
[18 Oct 2006 12:08] Carsten Segieth
mail sent to BitRock:

Hi BitRock Support,

the problem still exists with newst build (0.7.4), I could not see differences in the behaviour. 

Please find attached the log files, the install.agent.cmd and the optionfile I used. Important: the install.debugtrace.log file was created as specified in the directory where I wanted to see also the software.

Regards,

   Carsten
[18 Oct 2006 12:08] Carsten Segieth
.cmd + optionfile, install logs

Attachment: bug#22731.zip (application/zip, text), 21.20 KiB.

[20 Oct 2006 3:47] Keith Russell
Bitrock reports solved in builds >= 7.6
[21 Oct 2006 23:53] Bill Weber
Still fails with build 7.9. Just using --mode unattended and piping to a file outputs:

Error creating directory C:/MySQL/Downloads/0709/***unknown variable defaultinstalldir***

C:\MySQL\Downloads\0709 is the directory that contains the install exe.
[24 Oct 2006 14:09] Carsten Segieth
using 0.7.10 and my script (described above) works, agent installed successfull, agent startable after install, but the unInstall seems to have problems. But if a re-test shows this again this will be opened as a different problem.