title: Get Port Number for Apache Tomcat
body: <p>I am having fun creating my first NSIS installer:</p>
  
  <ol>
  <li>Aborts if 32bit</li>
  <li>Checks for a JRE - installs if not</li>
  <li>Option to install Tomcat (embedded installer)</li>
  <li>Option to deploy WARs (potentially this could be in the above Tomcat or another instance on the same box)</li>
  </ol>
  
  <p>(<em><a href="http://pastebin.com/BxiWCykU" rel="nofollow noreferrer">Here</a> is the entire script if need be.</em>)</p>
  
  <p>I am thinking of using <code>ReadRegStr</code> to try and present the user with a list of available Tomcat instances.</p>
  
  <p>However, what I was hoping to do...</p>
  
  <p><strong>Conundrum</strong>:
  At the end of the NSIS script, I wanted to dump some shortcuts on the Desktop with links to the application that gets deployed under Tomcat.</p>
  
  <p>However, from registry entries alone, I cannot get at the port number.<br>
  What is the best approach here?  I imagine I need to dive into a config file under the Tomcat folder or is their a simpler way?</p>
  
  <p><img src="https://i.stack.imgur.com/9GrQg.png" alt="enter image description here"></p>
  
  <p><a href="https://stackoverflow.com/questions/8708226/port-availabilty-check-on-remote-system">Slightly related Q</a></p>