title: Locate the path of an Apache server on windows
body: <p>For a windows script I am writing, I need to detect if the machine has Apache 2.2 installed, and to find the application path. </p>
  
  <p>One solution I came up with is to wget  <a href="http://localhost:8080/server-info" rel="nofollow noreferrer">http://localhost:8080/server-info</a> and parse the root and the config file from it. This would fail if the server does not use port 8080</p>
  
  <p>Another option would be to call “sc qc Apache2.2” and to parse the returning string. This would fail if the server is not installed as a service, or is using a different name. </p>
  
  <p>Is there any better way to do that?</p>