I'm trying to enhance the installer we use for an opensource application, but I'm stuck with the whole SendMessage thing.
Here is what I currently have:
- Using MUI 2, offer the default "DIRECTORY_PAGE" allowing to choose an install directory
- With a .onVerifyInstDir function, check if the chosen directory is eligible
- If eligible, .onVerifyInstDir does nothing
But here's what I would like to do:
- If not eligible, I would like to close the "Browse" window opened from DIRECTORY_PAGE.
The code is like this:
---
MessageBox MB_OK|MB_USERICON "Cannot require admin privileges" IDOK true
true:
;TODO:close browser
Abort
Here's a screenshot to illustrate:

On click 1, simulate click 2.
I tried some things, but no luck so far.
SendMessage $hwndparent ${WM_COMMAND} 3 0 allows me to trigger "previous" button, but it doesn't close the browser.---
this is a snippet that I found here, but it doesn't do anything.
FindWindow $1 "#32770" "" $HWNDPARENT
SendMessage $1 ${WM_CLOSE} 0 0
Could you please help me ? Thanks !