Skip to content
⌘ NSIS Forum Archive

Uninstall Function Not Working

4 posts

starfighter5#

Uninstall Function Not Working

I am trying to call a custom function before the welcome page in my uninstaller using the command below

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_FINISH

ShowUninstDetails show
!define MUI_UNPAGE_CUSTOMFUNCTION_PRE un.warning
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
And the functions is as follows.....

Function un.warning
MessageBox MB_ICONEXCLAMATION|MB_OK "Test Warning Message"
FunctionEnd
When I compile I get the message.....

uinstall function "un.warning" not referenced - zeroing code out
The message doesnt get displayed, I am assuming the call is being cancelled out, anyone any ideas where I am going wrong?
Afrow UK#
Use MUI_PAGE_CUSTOMFUNCTION_PRE, even for uninstall pages. MUI_UNPAGE_CUSTOMFUNCTION_PRE is not correct.

Stu
starfighter5#
Thank Afrow!

So it is the name of the function that needs to be prefixed with un. - Not the call itself?