Skip to content
⌘ NSIS Forum Archive

How to close firefox windows

7 posts

jgpandit#

How to close firefox windows

Hello,

I am trying to close firefox and ie windows during an install and uninstall. I can get the ie windows to close. However the firefox windows wont close.

I am using 'user32::PostMessageA(i,i,i,i) i($1,${WM_CLOSE},0,0)' to close the windows, $1 being the window handle. It works with IE.

Should I be doing something different to close the firefox windows.

Thanks,
-Jayant.
CancerFace#
In my system Firefox creates a single PID for multiple threads while IE6 creates separate PIDs for each new window ...

Why don't you use the FCT plugin or just send ${WM_CLOSE} to the Firefox window?
There is also the NsProcess plugin ...
CF
Comm@nder21#
I am using 'user32::PostMessageA(i,i,i,i) i($1,${WM_CLOSE},0,0)' to close the windows, $1 being the window handle. It works with IE.
simply use SendMessage $1 ${WMCLOSE} 0 0
🙂
Afrow UK#
You won't be able to close Firefox if the user has multiple tabs open and the message box confirmation to close.

-Stu
Anders#
you could try to figure out what WM_COMMAND to send that will "Close all but active" tab first
jgpandit#
Thanks everyone for the tips. I think killing the process might be the most reliable way to close the windows. Will go that route most probably. Only other choice seems to be asking user to close manually first.

Thanks again.