Search code examples
windowspopupnsismessagebox

nsis : messagebox autoclose with MessageBox func


There is a way to autoclose message box ? with "MessageBox MB_OK" ?

ex : MessageBox MB_OK "Installation complete!"

i have tried : the banner,but it takes the name of install programm and it is not very friendly as popup.

Banner::show "Install Complete."
Banner::getWindow
Pop $1
again1:
    IntOp $0 $0 + 1
    Sleep 1
    StrCmp $0 100 0 again1
Banner::destroy

Solution

  • Section 
    System::Call 'USER32::MessageBoxTimeout(p$hWndParent, t "Hello world", t "Title goes here", i0, i0, i 5000)' ; 5 seconds
    SectionEnd
    

    Note that this function is undocumented and only works on XP and later...