Expand WAR in WebApps right folder

I am building my first NSIS script and enjoy the learning curve.

The application is already:

  • Checks if the machine is 64-bit, aborts if 32bit.
  • Searches for a JRE and installs one if not found.
  • Installs Apache Tomcat 7 using the built-in installer.

    ExecWait '"$ PLUGINSDIR \ apache-tomcat-7.0.19_x64.exe"

From this separate installer, the user can choose a different default location for installing Tomcat.

It is also possible that another Tomcat may already exist on the same machine, and they install the second instance using different port numbers.

I looked at several other samples, but they install Tomcat by unpacking the zip version into a specific folder.
I think this is the best approach to run the TC7 exe installer. It will also make life easier when we need to change it to a newer version.

So my Q: What is the best approach to save the path of where they just installed Tomcat so that I can grab it from the Tomcat installer and use it back in my NSIS script to deploy WAR files?

I was hoping to find a system variable, but could not see it.

+5
source share
1 answer

Tomcat HKLM "SOFTWARE\Apache Software Foundation\Tomcat\@VERSION_MAJOR_MINOR@\$TomcatServiceName" "InstallPath", $TomcatServiceName, , , , EnumRegKey , Tomcat ...

+2

All Articles