Skip to content
⌘ NSIS Forum Archive

Manage sections dynamically

1 posts

Sawan#

Manage sections dynamically

Hi All,

I am using following code...

Name InstTest
OutFile 'InstTest.exe'

InstType "Typical"

!include MUI.nsh

!insertmacro MUI_PAGE_LICENSE '${NSISDIR}\license.txt'
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_LANGUAGE "English"

Section "Install Java SDK" SEC_1
SectionIn 1 RO
;;;;;;;;;;;;;;
SectionEnd

Section "Install MySQL database server" SEC_2
SectionIn 1 RO
;;;;;;;;;;;;;;
SectionEnd

Section "My Client" SEC_3
SectionIn 1 RO
;;;;;;;;;;;;;;
SectionEnd

Section "-My Server" SEC_4
;;;;;;;;;;;;;;
SectionEnd
Now on run time if user selects 'Typical' then my requirement is to make RO (Read only) first 3 Sections and hide fourth one and if user selects 'Custom' then remove RO (Read only) from first three sections and unhide fourth one.

How it can be done...? Plz send me the solution with code..

Thanks and regards