NSIS MessageBox jump offset

348 views Asked by At

I'm not able to understand what's wrong with the below code for jumping to particular offset if MessageBox returns IDNO.

Below code is to quit installer while IDNO is selected, but it always jumping to Goto endCurrentBlock line

    MessageBox MB_YESNO|MB_ICONEXCLAMATION "Would you like to continue installation?" IDNO +3
    !insertmacro ShowStatus "Failed to install software"
    Goto endCurrentBlock
    Quit

If I use a absoule label for jump it's working good. What could be the reason?

1

There are 1 answers

2
Anders On BEST ANSWER

Jumping by offset skips x number of NSIS instructions but !insertmacro is a preprocessor instruction that might expand to zero, one or several NSIS instructions.

It is not recommended to combine offset jumps and !insertmacro because it can break your code just by changing the macro...