How do you best determine if and where Apache is a component of a home windows machine?
I am writing a script that utilizes the installed apache, but creates it's own config &lifier server-root, and I'd rather not hardcode it nor possess the user clearly place it (unless of course necessary).
I attempted to look the registry, but could not find anything helpful.
Update for individuals posting default pathways:
On my small machine, it had been in C:/Program Files/Apache Software Foundation/Apache2.2. And when I'd Vista 64-bit, it'd most likely be under 'Program Files (x86)'. And when the pc does not come with an British OS, it's a whole lot worse.
Guess I must check %PROGRAMFILES% for Apache 2. or 2.2's default path, then fall to a prompt. It's be nice to see the registry and discover wherever it's.
I can not really beleive I am the first who would like to solve this correctly? :)
On Home windows it's set up in c:/Program Files/Apache Group/Apache2/bin/Apache.exe
Relaxation from the sites (conf, log, doc-root, etc) they are under c:/Program Files/Apache Group/Apache2
No answer, but personally, I'd just use the default path (%PROGRAMFILES%Apache GroupApache2binApache.exe) or a few relatively safe default pathways, and prompt when the executable wasn't found.
Otherwise it could get a totally unpredicted installation. I personally don't like programs which are "too wise".
I had not installed Apache for those customers on my small machine, hence no registry key. But when you do that, it's situated here:
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Apache\2.2.xx\ServerRoot
Look for httpd.exe within the registry under HKLMServicesCurrentControlSet.