I've created a custom screen with some input fields that are saved to an .ini file. That works great, but when I press the CANCEL button on this custom screen the values are written to the .ini file!
Also, how is it possible to check if the fields are filled in? If not, show a message dialog that they must be filled in. And when a FileRequest/DirRequest is used, if the file/dir exists? (if they don't use the chooser)
Function SettingsPage
# Display the page.
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "screen1.ini"
!insertmacro MUI_INSTALLOPTIONS_READ $Username "screen1.ini" "Field 1" "State"
WriteINIStr "$INSTDIR\settings.ini" "settings" "username" "$Username"
FunctionEnd
Thanks for the time/help.