Skip to content
⌘ NSIS Forum Archive

Enable "Close" button in system menu

3 posts

grundic#

Enable "Close" button in system menu

Hello.

I've got a little problem: after my installer past MUI_PAGE_INSTFILES (that is, after copying all files), I show to users custom page: "Installation finished, bla-bla-bla". And in this custom page the "Close" button of system menu is disabled. I tryed this code:
Function EnableClose
    push $1
    System::Call "user32::GetSystemMenu(i $HWNDPARENT,i 1) i.s"
    pop $1
    System::Call "user32::EnableMenuItem(i $1,i 0xF060,i 0)"
    pop $1
FunctionEnd 
But it's only ungrays the button. But when I click on it - nothing happens. Can I fix it somehow?

Thanks.
Afrow UK#
I believe you just need to EnableWindow $mui.Button.Cancel 1.

Edit: in the page's show function that is.

Stu