Old 22nd January 2007, 04:57   #1
Sawan
Junior Member
 
Join Date: Jan 2007
Posts: 6
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
Sawan is offline   Reply With Quote
Old 22nd January 2007, 05:26   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
See the included header sections.nsh

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 22nd January 2007, 05:40   #3
Sawan
Junior Member
 
Join Date: Jan 2007
Posts: 6
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
Sawan is offline   Reply With Quote
Old 22nd January 2007, 05:54   #4
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Code examples provided at wiki,
http://nsis.sourceforge.net/Category...ment_Functions

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 22nd January 2007, 08:58   #5
Sawan
Junior Member
 
Join Date: Jan 2007
Posts: 6
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
Sawan is offline   Reply With Quote
Old 22nd January 2007, 10:45   #6
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
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.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump