InstallShield Tips and Techniques

June 1, 2013

Installing Apache Tomcat v7.x silently with command line options

Filed under: Reference Materials — shieldmaster @ 10:50 pm

I recently have been working on RSA Security installation processes, and one of the tools that needed to be installed was Apache Tomcat v7.x. I was building a simple batch command process that was installing all of the 3rd Party software applications, such as:

  • Microsoft Visual Studio C++ Redistributable (64bit) – (vcredist.msi)
  • JAVA JRE 1.7_15 (jre-7u15-windows-i586.exe)
  • Apache Tomcat v7.0.35 (apache-tomcat-7.0.35.exe)

The first two software applications were essentially MSI packaged applications – so a traditional batch method to execute a MSI was appropriate, such as:

 

REM  ******************************************************************

REM  **  Install Microsoft Visual Studio C++ Redistributable (64bit)   

REM  ******************************************************************

msiexec /i "%BATCH_SCRIPTS_DIR%\3rdPartyApps\VCRedist\vcredist.msi" /qb /Lvoicewarmupx "%BATCH_INSTALL_PATH%\Logs\VC2005SP1Redist.log"

 

REM  ******************************************************************

REM  **  Silently install JAVA JRE 1.7_15                                        

REM  ******************************************************************

"%BATCH_SCRIPTS_DIR%3rdPartyApps\jre-7u15-windows-i586.exe" /s /v"INSTALLDIR="%BATCH_INSTALL_PATH%\JRE" ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 JAVAUPDATE=0 REBOOT=suppress /L*vx %BATCH_INSTALL_PATH%\Logs\JREInstall.log" " /qn

 

The last software application was something other than a traditional MSI packaged applications – I could not find a method to execute it silently. After quite a bit of research, I think it is packaged as a “NSIS installers”, which are generated by using the ‘MakeNSIS’ program to compile a NSIS script (.NSI) into an installer executable. They use a different set of silent parameters than the traditional MSI packages. This is a link to documentation regarding these parameters.

In my situation, to install Apache Tomcat, I was able to use these parameters:

REM  ******************************************************************

REM  **  Silently install Apache Tomcat v7  

REM  ******************************************************************

"%BATCH_SCRIPTS_DIR%3rdPartyApps\apache-tomcat-7.0.35.exe" /S /D=%BATCH_INSTALL_PATH%\Tomcat

 

The Apache Tomcat installation will automatically locate the JRE installation, therefore does not need to be passed thru the command line.

Hope this helps!

ShieldMaster

Advertisements

3 Comments »

  1. That great! But what if anyone want to specify arguments like Name,Shutdown port, Http port and AJP port?

    Comment by Mohsin — May 16, 2016 @ 8:00 am

  2. Thats great! But what if someone need to specify name,shutdown port, http port and ajp port while installing tomcat silently?

    Comment by Mohsin — May 16, 2016 @ 8:02 am

    • Since Tomcat installation uses a proprietary installation – my only suggestion would be to review the MSI logs and see if these properties are exposed. Then you attempt to inject those properties in the call structure.

      ShieldMaster

      Comment by shieldmaster — May 24, 2016 @ 10:21 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: