Write true install path to .INI string
I've searched the fourms here for about two days, hoping someone else would have had my problem, but I guess i'm not using the correct search terms.
Here's my problem. I'm using the Modern UI for my installer, and i've set the Install Directory to "$DOCUMENTS\Test Run". Since this is a basic setup, easily deleted when they are done with the files, I don't want to create any registry keys since there is no uninstaller. I've also got the script set up to create an .ini file in the Windows Directory, so when I release an update to the first set, the following sets can simply look to the .ini file and read the install path if it's different than what I set as default.
The problem.
in my script I have this...
# Installer attributesWhich works wonderfully. Then, at the end I have this...
OutFile E:\Temp\Releasing\Test.exe
InstallDir "$DOCUMENTS\Test Run"
# Installer functionsNow, when the installer gets to the install directory page, I have the option for the user to choose another path to install the files to. If they change the path from the default "$DOCUMENTS\Test Run" one, the .ini file still only records the default install directory.
Function .onInit
WriteINIStr "$WINDIR\Test.ini" "Install Path" "Install_Dir" "$INSTDIR"
InitPluginsDir
FunctionEnd
I hope i'm explaining myself here, if the user chooses some random install path like "c:\gibberish\another folder\more gibberish" the .ini file will still record "c:\My Documents\Test Run"
How do I get the .ini file to record the actual install path? Am I missing some part of the readme included with NSIS?
ThanQ in advance for your help.