Old 11th October 2006, 06:39   #1
jgpandit
Junior Member
 
Join Date: Oct 2006
Location: Ottawa, Canada
Posts: 2
Send a message via Yahoo to 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.
jgpandit is offline   Reply With Quote
Old 15th October 2006, 13:51   #2
CancerFace
Senior Member
 
Join Date: Apr 2006
Posts: 289
Send a message via ICQ to 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
CancerFace is offline   Reply With Quote
Old 15th October 2006, 15:11   #3
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
Quote:
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
Comm@nder21 is offline   Reply With Quote
Old 15th October 2006, 15:15   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You won't be able to close Firefox if the user has multiple tabs open and the message box confirmation to close.

-Stu
Afrow UK is offline   Reply With Quote
Old 15th October 2006, 15:23   #5
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
yes you will, if you choose to kill the process instead of just close the window
Comm@nder21 is offline   Reply With Quote
Old 15th October 2006, 15:51   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
you could try to figure out what WM_COMMAND to send that will "Close all but active" tab first

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 20th October 2006, 04:14   #7
jgpandit
Junior Member
 
Join Date: Oct 2006
Location: Ottawa, Canada
Posts: 2
Send a message via Yahoo to 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.
jgpandit is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump