InstallDir problem
Hi,
I have a problem with Windows XP. After a successful installation, I change a path in a file according to the install dir.
But if the user changed the path, NSIS installs correctly to the new path but the line in the file is still the default path.
It works fine under Win2000 but not under XP.
This is the code:
I define the install directory as default and the user can overwrite it:
InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
Here, I open a file in a .onInstSuccess function. This works with the default install directory and if the user changed this dir.
FileOpen $0 "$INSTDIR\Apache\conf\httpd.conf" "r"
But in the same function I want to change a line *in* a file. Here, NSIS always uses the default folder and not the customized folder if the user changed it.
FileWrite $1 "ServerRoot $\"$INSTDIR\Apache$\"$\r$\n"
Do you know that problem?
Cheers,
Ben