Archive: comonents select on custom page?


comonents select on custom page?
I want only one Componente turn off or on. Can i make this on the custom page?
Or if this is not possible to add a text query into the components page?
With components and custom page works the script. I would like to save one of the two sides.

Thank for your help!
wuschel


It's very difficult to understand what you want to accomplish...

1) If you mean you want only one section out of several sections to be selectable by the user, you should either make the other sections invisible (start their name with a '-' dash) or set them to readonly (add the line 'SectionIN RO' in the section).
2) If you want the user to select a signle ON/OFF option, you can create a custom page with nsDialogs that contains a checkbox, or use a Yes/No MessageBox.
3) If you want to enable/disable an existing section depending on what the user chooses, you can use the SelectSection and UnSelectSection macros in Sections.nsh.


point 2) thats rigth.
Yes I will with nsDialogs and a checkbox of custume page one section select on/of
can you give a code example for this?


To learn how to use nsDialogs, please consult the nsDialogs readme. It has a beginner's walkthrough that should help you get underway.

http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html


I can works with nsDialogs. I do not have to code so that to activate a section or not. At this link, there is no example for this. I only know how to deal with the componets page to enable sections or not. With what command can I on a custom page sections(Components) aktivate or not.
Thanks wuschel


Like I said, you can enable and disable a section using the macros in Sections.nsh.

But a simpler idea would be to set a global variable in the custom page's leave function, depending on the state of the checkbox. Then in your installer section, put the entire stuff in an ${If} $YourCheckboxVariable == 1 (...) ${EndIf} .


thanks it`s run

with
${NSD_CreateCheckbox} 10 40 50% 6% "........."
Pop $hwnd
${NSD_OnClick} $hwnds EnSelectSection

and

Function EnSelectSection
Pop $hwnd
${NSD_GetState} $hwnd $0
${If} $0 == 1
!insertmacro SelectSection SEC_Name
${EndIf}
FunctionEnd

I was search for this code:
!insertmacro SelectSection SEC_Persistent