Archive: MUI_INSTALLOPTIONS_READ, never gets user value


MUI_INSTALLOPTIONS_READ, never gets user value
Hello,

I thank you all for youre quick replies and patient answers to my questions. Here is another one.

I've got 2 custom pages using installoptions.
Problem is that i never get the value the user entered, instead i get the value which is stored as default in my io ini-file.

I'm calling: !insertmacro MUI_INSTALLOPTIONS_READ $hostname "hostname.ini" "Field 2" "Text"

From a section. Hostname is declared at the begining of the script. I have reservefiles for the ini's.

The custom pages are displayed correctly, but the value returned from "!insertmacro ...READ" is not the one the user inputs it's the value which is in the .ini file as default.

How can this be? What am i missing?

Regards,
Simon


You probably want to read State and not Text. Take a look at the InstallOptions readme.


Exactly what i wanted.
Am i not reading carefully enough when i can't find anything about manipulating the submitted input? I wan't to remove the last "\" from DirRequests.


Use StrCpy. This example was taken from the documentation:

StrCpy $0 "a string" -1 # = "a strin"

Once again i thank you!
I ended up doing this:

StrCpy $1 $uncPath 1 -1
StrCmp $1 "\" 0 +2
StrCpy $uncPath $uncPath -1

It only removes the last if the last char is "\"