Archive: NOTIFY not doing what it Should


NOTIFY not doing what it Should
I have had this working before but it seems to have broken since I upgraded to the latest version NSIS (or I am missing something very subtle). I have searched to Docs and the forums and I don't see what I might be doign wrong. Everything appears to be right yet it still does not work.

I am trying to get the installer to add a link to the desktop if the user pushes a button.

My ini looks like this


[Settings]
NumFields=2

[Field 1]
Type=Label
Text="...Some text here.."
Left=4
Right=293
Top=4
Bottom=96

[Field 2]
Type=Button
Text=Help Remove Software Now!
Left=94
Right=203
Top=103
Bottom=119
Flags=NOTIFY

My code looks like this:

in the on init I load the ini

!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "ini\noNAV.ini" "NONAV"


After the button is pushed (and from another page's function) I check to see what the state is...

!insertmacro MUI_INSTALLOPTIONS_READ $R0 "NONAV" "Settings" "State"
StrCmp $R0 2 func1 func2


Whether I push the button or not $R0 is always 0. I am not sure what is going on

The NOTIFY flag should be used along with the leave function, not another later function. The STATE field is reset when the page is destroyed. I'm not sure how it worked before, it was always reset.


OK, that makes sense.

So I need to check the state in the leave function of the same page where the button lives?

Now that I think about it. That is originally how I had it set up. I decided that I wanted to use that info later on inthe installer so I moved it.

So it looks as though if I want that info later I can copy the state to a variable that will not be written over.

Thanks for your help I will give it a shot.


That did the trick. Thanks again.