Archive: How to change the text of the "next"-button?


How to change the text of the "next"-button?
Hi there!

I'm looking for an way to change the label of the "Next"-Button in an MUI custom page. I think I know which NSIS instructions I have to use, but anyway it seems I don't know how to use them.


!insertmacro MUI_HEADER_TEXT "Header" "Description"
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioUpgrade.ini"

FindWindow $0 "#32770"
GetDlgItem $1 $0 1 ;next/install button
SendMessage $1 ${WM_SETTEXT} 1 "STR: Install"

!insertmacro MUI_INSTALLOPTIONS_SHOW



Could someone give me an clue?

BTW when should I use "STR: <a string>" or "#<a number>"? I seems to have a different meaning.

Thanks...
David

Bit like this:


Push $R0

GetDlgItem $R0 $HWNDPARENT 1
SendMessage $R0 ${WM_SETTEXT} 0 "STR:Install"

Pop $R0

Ah... there is already an constant for this. Great!

Could I use the a MUI LANG_STRING with WM_SETTEXT? I'd like to use the default string "Install" from the language string table.

Thanks...
David


To get the default install string use $(^InstallBtn).


Hi kichik!

Thanks a lot! That's what I was looking for. It works now as expected:)

Thanks...
David


I used the following code for renaming Next-button text (IMHO - more simple)


...
LangString nextbut_txt ${LANG_ENGLISH} "Install"
LangString nextbut_txt ${LANG_RUSSIAN} "Óñòàíîâèòü"

...

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioUpgrade.ini" "Settings" "NextButtonText" "$(nextbut_txt)"

glory: this works only with installoptions pages.


Well for DavidScheffel, that would be the best method since he is using InstallOptions for that particular dialogue.

-Stu


this works only with installoptions pages
Yes. I wrote post with such condition. Because DavidScheffel wrote
Next"-Button in an MUI custom page.