How do I best figure out if and where Apache is installed on a windows machine?
I'm writing a script that uses the installed apache, but sets up it's own config & server-root, and I don't want to hardcode it nor have the user explicitly set it (unless necessary).
I tried to search the registry, but couldn't find anything useful.
Update for those posting default paths:
On my machine, it was in C:/Program Files/Apache Software Foundation/Apache2.2. And if I had Vista 64-bit, it'd probably be under 'Program Files (x86)'. And if the computer doesn't have an English OS, it's even worse.
Workaround:
Guess I have to check %PROGRAMFILES% for Apache 2.0 or 2.2's default path, then fall back to a prompt. It's be nice to read the registry and find out exactly where it is.
I can't really beleive I'm the first one who wants to solve this properly? :)