I want to remove icon from title bar of message box window that appears during installation. (Image 1)
I want to remove the icon like this window. (Image 2)
Is there any other way I can try with the below?
Function .onGUIInit
MessageBox MB_OK "Hello, world!"
FunctionEnd
Section
...
SectionEnd
No, you cannot change that icon (you would have to write a custom plug-in to do that).
You can change the main MessageBox icon but not its titlebar icon:
!define /IfNDef MB_OK 0
!define /IfNDef MB_USERICON 0x80
PEAddResource "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-blue-full.ico" "#Icon" "#200"
Section
System::Call KERNEL32::GetModuleHandle(p0)p.r1
System::Call '*(&l4,p$hWndParent,pr1,ts,ts,i${MB_OK}|${MB_USERICON},p200,p0,p0,i0)p.r9' "Hello world from Win32" "Title goes here"
System::Call 'USER32::MessageBoxIndirect(t)(pr9)'
System::Free $9
SectionEnd