Archive: MUI_INSTALLATIONOPTIONS_WRITE issues


MUI_INSTALLATIONOPTIONS_WRITE issues
MUI_INSTALLOPTIONS_WRITE doesn't work for me, below is the script...whts wrong with it.

;------------------------------
;Pages

!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"
!insertmacro MUI_PAGE_COMPONENTS
Page showCustomPage
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
;-------------------------------

Section "Install MyTrial"

SetOutPath $INSTDIR

;Put file there
File "c:\Temp\junk\Distrib.exe"

SectionEnd
;---------------------------------

;Installer Functions

Function .onInit
;Extract INI file
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioA.ini"
FunctionEnd

Function showCustomPage
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Field2" "Text" "XYZ"
FlushINI "ioA.ini"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioA.ini"
FunctionEnd

;--------------------------------

MUI_INSTALLOPTIONS_WRITE doesn't write to the ioA.ini file, though MUI_INSTALLOPTIONS_DISPLAY works. All comments and help much appreciated.


does your script contain these lines?

ReserveFile "ioA.ini"
MUI_RESERVEFILE_INSTALLOPTIONS

Yes it does...

;-------------------------------
;Reserve Files

ReserveFile "ioA.ini"
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS

;---------------------------------


It should be "Field 2" not "Field2". Use `ExecShell open $PLUGINSDIR\ioA.ini` before the display macro and you'll be able to see exactly how your INI file looks.


Thanx a lot kichik...it worked ! Gosh can't believe it was a simple typo! Thanx again 4 ur help.