Archive: Remove RO while selecting Custom


Remove RO while selecting Custom
Hi all,

"Can we remove RO (Read only) from any section while selecting Custom...?"

I have 2 options on my components page..
1. Typical
2. Custom

Now if user selects 'Typical' then I want to assign RO for all the sections and if user selects 'Custom' then I want to remove that RO from all sections.

Is it possible...? If yes then How can I accomplish this goal..? Also if you have another way to do this, plz let me know as soon as possible...

Thanks & regards

Sawan


See the included header sections.nsh


Thanks Red Wine for your suggestion...

But dear, I am a new user of NSIS and I am not able get any solution while looking "sections.nsh". It will be better if you can provide me code to achive this specific target.

Thanks alot in advance...

Regards

Sawan


Code examples provided at wiki,
http://nsis.sourceforge.net/Category...ment_Functions


Hi Red Wine,

I visited the link and tried the samples. But still I did not found the solution, which I am exactly looking for. 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 first 3 Sections and hide fourth one and if user selects 'Custom' then remove read only from first three sections and unhide fourth one.

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

Thanks


Assuming that now you're familiar with the subject, next step should result success, if you read the documentation at 4.9.13 Section Management.