Archive: Help with RegStr


Help with RegStr
I am trying to save the install folder so that when the installer is ran again, it will remember the install location and show it in the textbox when they go to hit install. I am very new at this, and I have been trying to read the forums, manual, among other things for help.


--this is what i use to write the regstr after the files have been installed
WriteRegStr HKLM ProgramName InstallSource "$EXEDIR"

Function .onInit
ReadRegStr $2 HKLM ProgramName InstallSource
ifErrors notpossible possible

possible:
StrCpy "$INSTDIR" "$2"

notPossible:


ClearErrors
FunctionEnd


Have a look at the InstallDirRegKey attribute:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.8.1.22