Archive: Edit Apache httpd.conf


Edit Apache httpd.conf
I'm trying to build an installer that should edit httpd.conf from Apache and have two problems.

1. To find the Apache installation I read the key HKLM "Software\Apache Group\Apache\2.0.48" "ServerRoot". It works but what if there is another version of apache installed. How do I find the version number?

2. I'm writing paths for example DocumentRoot to $INSTDIR using a replace script I found NSIS Archive but I have backslashes i my $INSTDIR variable and needs slashes for httpd.conf. How do I fix that?

Regards,
Johannes


Hi! :)

1. Use EnumRegKey
2. I Think you'll have to edit the Function.


Hi,

I need to do the same, have you already modified the function? Or have yousolve this issue in any other way?

Thanks.

Javi.


Just do


Push $R0
StrCpy $R0 $INSTDIR
Push $R0
Push "\"
Push "/"
Call StrReplace
Pop $R0
; etc
Pop $R0


You need StrReplace function from Archive

-Stu

Thanks
Thanks,

Already working!

Cheers