Search code examples
nsis

How to add a link on the lower zone, near the Back/Next buttons


I would like to add a link to our company's website on the lower left corner of the installer window, but don't know how to do it since it's out of the editable area (I use NSIS Dialog Designer to design our custom pages):

enter image description here

I found how to add a button here, but I need a link.

Hope you can help me.


Solution

  • This example uses the Linker plug-in to transform the brandingtext label to a link control. If you need both brandingtext and a URL you need to add another label with Resource Hacker + ChangeUI or add it at run-time by using System::Call user32::CreateWindowEx(...)

    BrandingText /TRIMRIGHT "Visit our homepage"
    
    Function .onGuiInit
    GetDlgItem $0 $HWNDPARENT 0x404
    EnableWindow $0 1 ; Branding text control is usually disabled
    Linker::link /NOUNLOAD $0 "http://www.example.com/"
    FunctionEnd
    
    Function .onGuiEnd
    Linker::unload
    FunctionEnd
    
    Page Components
    Page Instfiles
    
    Section
    SectionEnd