Archive: Problem with MUI and Custom Pages


Problem with MUI and Custom Pages
Hi !

I use MUI and I have a small problem with custom pages. Actually, I check some keys in the registry. If they exist, the installation carries on. If not, a custom page appears asking the user to enter some parameters.


ReadRegStr "$REG_VAR" HKLM SOFTWARE\My app "param"
StrCmp "$REG_VAR" "" Error ok

Error: !insertmacro MUI_INSTALLOPTIONS_DISPLAY "custompage.ini"

ok: {next steps}


But it doesn't work. The page appears but the buttons are disabled and I can't go to the next steps of the installation. What's wrong?

Thx for help !

Works fine for me:

Function CustomPageA

!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"

MessageBox MB_YESNO|MB_ICONQUESTION "Display $(TEXT_IO_TITLE)?" IDNO Skip

!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioA.ini"

Skip:

FunctionEnd
(Modified Modern UI\InstallOptions.nsi example script).

What happens if you remove the code that skips over the page (so the page is always shown).

Are you sure there's another page after this custom page?

-Stu

The regular way to insert a custom page would be like that:

!insertmacro MUI_PAGE_WELCOME
Page custom CustomPage
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

However if I insert the Custom page here, it will always be displayed, or i want to display it only if some reg keys doesn't exist. That's why I tried to insert it in my section instead of in the listing of pages. But it doesn't work either.

Look at my code above.

You need to jump over the MUI_INSTALLOPTIONS_DISPLAY call in the CustomPage function.

Edit:
Also, look at this topic (latest topic on this forum). He's doing a similar thing.

http://forums.winamp.com/showthread....hreadid=220713

-Stu


Ok thx, the page works now :)