Archive: Comparision outside function/section


Comparision outside function/section
Dear All,
I am facing one serious problem in using NSIS. First I will explain my requirement.
Depending on the value of some environment variable, I want to show the INSTALL page.
Example: If value of environment variable say abc="C:\Myself" then I do not want to show the INSTALL page else if the abc="" then I would like to show the INSTALL page.

I could read the environment variable, compare the string is also ok but if the string is "" then I could not insert macro inside function/section(compiler Error). And also I can not compare variable outside function/section( compiler Error)

Does anybody know the solution to above proble?

Thanks in advance.

Regards,
NitinU


try this..

!define MUI_CUSTOMFUNCTION_INSTFILES "your function"

!insertmacro MUI_PAGE_INSTFILES

Function "your function"

stuff here

FunctionEnd

you can also use this in .onInit
like this...

Function .OnInit

call "your function"

FunctionEnd