Archive: Mui_installoptions_write


Mui_installoptions_write
Hi,

I've read on the forums that in a MUI, it's better to use !insertmacro MUI_INSTALLOPTIONS_WRITE instead of WriteIniStr and !insertmacro MUI_INSTALLOPTIONS_READ instead of ReadIniStr.

I've try in my code but it doesn't seems to work.

OK :

WriteIniStr "$PLUGINSDIR\DlgJvmDetection.ini" "Settings" "JvmDisplayName" "$R0"
WriteIniStr "$PLUGINSDIR\DlgJvmDetection.ini" "Settings" "JvmDisplayVersion" "$R1"
WriteIniStr "$PLUGINSDIR\DlgJvmDetection.ini" "Settings" "JvmContact" "$R5"


NOT OK :
!insertmacro MUI_INSTALLOPTIONS_WRITE "$PLUGINSDIR\DlgJvmDetection.ini" "Settings" "JvmDisplayName" "$R0"
!insertmacro MUI_INSTALLOPTIONS_WRITE "$PLUGINSDIR\DlgJvmDetection.ini" "Settings" "JvmDisplayVersion" "$R1"
!insertmacro MUI_INSTALLOPTIONS_WRITE "$PLUGINSDIR\DlgJvmDetection.ini" "Settings" "JvmContact" "$R5"


I'm using NSIS 2.05 and Modern User Interface version 1.72.

MUI_INSTALLOPTIONS_WRITE is a substitute for WriteINIStr where it simply concatinates your INI file name with the $PLUGINSDIR path infront of it.

Therefore, you need to remove $PLUGINSDIR from your MUI_INSTALLOPTIONS_WRITE calls.
Or, just use WriteINIStr as you are already doing so.

-Stu