In my code section I need to modify an existing configuration file (Apache httpd.conf) to include one of the files I'm installing in the Files section.
How can I reference my .conf file, so I can insert into the httpd.conf something like this:
Include "C:/Program Files (x86)/Apache Software Foundation/Apache2.4/conf/myinclude.conf"
I think I can do something like:
ExtractFilePath( {app} ) + '\conf\myinclude.conf'
to get the full path of the file.
However that means I have to hard code the partial path in my script code. If we later change the path then I have to change it in the files section and remember to change it in the script code too.
Is there a way to reference the file just by name and get the full installed path?
Secondary question:
What's the best place to do this kind of thing (modifying a file)?
- In the
AfterInstallof the file I'm going to modify it for? - In
NextButtonClickonwpFinished? - Other?