Skip to content
⌘ NSIS Forum Archive

Help

7 posts

andy susanto#

Help

Hai,

i want to user pickup a MySQL Directory first,because i need to run mysql.exe, so i create Dir Objec in HM NIS. but that object not show. i would like that object to be show in

Section /o "Create Database"

Can anyone Help ?


================inputtext.ini================
; Ini file generated by the HM NIS Edit IO designer.
[Settings]
NumFields=2

[Field 1]
Type=DirRequest
State=DirRequest
Left=37
Right=160
Top=27
Bottom=40

[Field 2]
Type=Label
Text=MySQL Dir
Left=38
Right=72
Top=12
Bottom=20
[edit]script attached below 👎[/edit]
Afrow UK#
You cannot display an InstallOptions dialog from a section.
You must call it inside a custom page function created by:

!include Sections.nsh

Page Custom ShowFunc

Section /o "Create Database" SecCreateDatabase
SectionEnd

Function ShowFunc
!insertmacro SectionFlagIsSet ${SecCreateDatabase} ${SF_SELECTED} "" End
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioFile.ini"
End:
FunctionEnd

-Stu
kichik#
Please attach large scripts instead of pasting them. And when you do paste in a script, use [code] markup so it'll look better.
andy susanto#
Afrow,

i try yours example code but when i compile it, i get an error

!insertmacro: end of SectionFlagIsSet
!insertmacro: MUI_INSTALLOPTIONS_DISPLAY
!insertmacro: macro named "MUI_INSTALLOPTIONS_DISPLAY" not found!
Error in script "F:\Data\Development\eclipse\payroll\payroll-inst-script.nsi" on line 96 -- aborting creation process

TIA,

andy
andy susanto#
i use InstallOptionsEx, now i can see my custom page, but the order not what i want.

i would like the page display like this

1.Page Component
2.install the component
3.a page that ask mysql dir
4.install the program

but what i get is a "page that ask mysql dir" showing as last page.

How to get that i want.
Afrow UK#
Move:
Page Custom ShowCustom CloseCustom
To where you want it. The order of pages set in the script will be the same for the installer.

-Stu