Archive: Help


Help
Hai,

Can anyone help me to solve my problem ?

My Problem is:

I Have 4 Component and 3 of Component i set directory with SetOutPath $TEMP.

if user click my fourth Component, I would like a user to Browse to a locate directory, because my old installer do not save the information on Registry

and if i use DirText when user click first,second,third component NSIS will ask to locate directory

TIA,

andy


If you're using NSIS 1.98 define .onNextPage and .onPrevPage, count the pages in them and use Abort to skip the page when you get to the directory page and the user hasn't selected the fourth component.

If you're using NSIS 2, define a pre-function for the directory page and call Abort in it to skip the page if the user hasn't selected the fourth component.


I am using NSIS 2, Can you give me an example how to do that

TIA,

andy


If you're using the MUI:

!include Sections.nsh

!define MUI_CUSTOMFUNCTION_DIRECTORY_PRE myDirPre
Function myDirPre
SectionGetFlags ${mySection} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
StrCmp $R0 ${SF_SELECTED} +2
Abort
FunctionEnd


The define name my differ from the CVS version to b3 so make sure you get the right name from the MUI readme.

Without the MUI:

Page directory myDirPre

# same myDirPre function as above

hai,

i am try your code, why everytime user check first component browse directory show, what i want is everytime fourth component check browse directory show and i am try to debug that code but i can not, because i am not understand and i am try to see helpfile but it can not help me too. How to understand that code and change the code, because this script not like other installer. Can you help me ?


TIA,

andy


Make sure ${mySection} is defined and contains the number of the right section (3 in your case - it starts off zero). If it doesn't put that code after the section is defined, because as this is a define the order in the script matters.