Archive: Adding a custom button to the components page

Adding a custom button to the components page
How do i add a custom button to the standard components page?
I found the solution using ButtonEvent.dll
But the button works only at the bottom of the page.
If i change Y pos to 200, the button doesnt work. Please help


>!define IDC_ABOUT 1300


Name "Example1"
>OutFile "example1.exe"

>!insertmacro MUI_PAGE_INSTFILES

>!insertmacro MUI_LANGUAGE "English"

>Function CompShowProc

::Call 'user32::CreateWindowEx(i0,t"Button",t"Add Host",i${BS_PUSHBUTTON}|${WS_CHILD}|${WS_VISIBLE}|${WS_TABSTOP},i80,i300,i90,i25,i$HWNDPARENT,i${IDC_ABOUT},ir0,i0)i.R0'

CreateFont $0 '$(^Font)' '$(^FontSize)'
SendMessage $R0 ${WM_SETFONT} $0 0
GetFunctionAddress$0 FuncAbout
ButtonEvent::AddEventHandler /NoUnload ${IDC_ABOUT} $0


>Function FuncAbout

System::Call 'user32::MessageBox(i$HWNDPARENT,t"It works!",t"About",i0x40)'


Section "Component1"

Section "Component2"

Section "Component3"

I suppose your button is covered by Inner dialog - move it somewhere else.

To create buttons inside Inner dialog's area use nsDialogs plug-in.

But nsDialogs allows creation of custom pages. I need to modify the standard components page

I've found the following article:
Can this help me to solve my problem?

That article helps you only a little.
nsDialogs indeed cannot create button in standard dialog.

Create button using ResHacker if you want to have it in a standard page.
Modify one of the .exe files in Contrib/UI folder (that one you use in your installer) and use ButtonEvent plug-in.