Hey All,
I'm try to get NSIS 2.0 to allow for multiple io.ini files to display, depending on which install options are choosen. For example, if the user chooses "Sample Configuration", I'd like to be able to display an IO screen prompting them for which files to create.
I've got the page to display, but it always displays, regardless if the "Sample Configuration" is selected.
Any help would be appreciated! 😁
Multiple io.ini files on 2.0
8 posts
I would imagine you're running into problems with correctly reading the values from the page where the user has to make a selection for what page will be displayed next. What script code are you using to read the status from the controls of your custome pages?
!include "Sections.nsh"
Section "Optional" SecOptional
File "opt.exe"
SectionEnd
Function YourPageFunction
SectionGetFlags ${SecOptional} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
StrCmp $R0 ${SF_SELECTED} +2
Abort ;Skip page if optional section not selected
...section selected, display IO dialog...
FunctionEnd
Originally posted by Joost VerburgI tried that now I get:
!include "Sections.nsh"
!define: "HWND_BROADCAST" already defined!
!include: error in script: "C:\Program Files\NSIS\Include\Sections.nsh" on line 10
I'm guess because I have:
!include "MUI.nsh"
!include "WinMessages.nsh"
!include "Sections.nsh"
Is there a way to correct this?
Thanx!
Hey,
I changed WinMessage.nsh and Sections.nsh with the following:
since I couldn't think of a way to do it in my .nsi file. Dunno if this should be listed as a bug?
I changed WinMessage.nsh and Sections.nsh with the following:
!ifndef HWND_BROADCAST
!define HWND_BROADCAST 0xFFFF
!endif
since I couldn't think of a way to do it in my .nsi file. Dunno if this should be listed as a bug?
Sorry to keep buggin'.... 😉
I've got it to work, however, if the section is not selected, the final page still has a "Next" button instead of an "Install" button. Is there a way to make it know there is no follow up page?
Thanx!
I've got it to work, however, if the section is not selected, the final page still has a "Next" button instead of an "Install" button. Is there a way to make it know there is no follow up page?
Thanx!
The MUI already inserts WinMessages, so you don't have to insert that one. I removed HWND_BROADCAST from Sections.nsh.
Originally posted by ironheadIt's possible, but changing buttons confuse the user.
Sorry to keep buggin'.... 😉
I've got it to work, however, if the section is not selected, the final page still has a "Next" button instead of an "Install" button. Is there a way to make it know there is no follow up page?
Thanx!
I recommend to put the page after the instfiles page.