WINAMP.COM | Forums > Developer Center > NSIS Discussion > Closing IE Windows |
Last Thread
Next Thread
|
| Author |
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
Try this search: __________________ |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
What I have is a customer with 2 proxy servers, and I'm writing an app using NSIS to change the proxy settings based on a commandline parameter in the shortcut to the proposed NSIS App. |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
No further ideas on this? __________________ |
||
|
|
|
jthompson Junior Member
Registered: Nov 2002 |
Well, at least on Windows XP SP1 with IE6, all open IE windows automatically get a proxy server change. I opened 5 windows and changed that setting (to a bogus server) in one window and tried browsing to google in one of the other windows. Did not work because the proxy setting was read by all open windows. |
||
|
|
|
Sunjammer Major Dude
Registered: Jun 2002 |
I have a little macro in one of my installers which might be of interest. See the attachment. The coding is pretty poor but I've never needed to improve it for that installer so I never bothered. Strictly speaking the macro could use offset jumps instead of labels which would be much better.
|
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
__________________ |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
I am calling it using: The problem is that it locks IE, I lose the content, and the Menubar greys. BTW I used Win32spy to get the class name (cool tool!!). But this doesn't seem to actually close IE. I have also seen some C code for doing this, which may be useful in a DLL if you can make one, but haven't tested it yet. If you are interested I can email it to you. Or if you have any further ideas on the code above, please let me know. Thanks dude! __________________ |
||
|
|
|
stereo Junior Member
Registered: Sep 2001 |
IE is a bit different in that it doesn't seem to want to close using SendMessage() calls. |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
__________________ |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
BTW, I'm still using 1.98 I think, maybe 99, but havne't made the move to version 2 just yet! __________________ |
||
|
|
|
Sunjammer Major Dude
Registered: Jun 2002 |
System::Call 'user32::PostMessageA(i,i,i,i) i($0,${WM_CLOSE},0,0)' |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
__________________ |
||
|
|
|
Sunjammer Major Dude
Registered: Jun 2002 |
Errm good question. System was first distributed with NSIS in version 2.0b0 according to the release history. My improved plugin syntax became part of NSIS as of version 2.0a4 so the syntax would have to be that of the old CallInstDLL command, so you'd have to push the argument to the stack first... something like this: code: I *think* that syntax is correct. Whether it will actually work? No idea. Anyway what are you using 1.98 for??? |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
code: I *think* that syntax is correct. Whether it will actually work? No idea. Anyway what are you using 1.98 for??? LOL...cheers dude! I have just compiled my little thing in v.2.0b and it works ok. I have also tried your system call but it only seems to cclose one window...just need to put it into a loop I guess. I'll let you know how I get on, but this might work out ok! Thanks again __________________ |
||
|
|
|
Sunjammer Major Dude
Registered: Jun 2002 |
You mean that System code I just concocted works??? Woohoo that was unexpected !!! |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
YEEEEEHHHH!!!! Thanks for the help! __________________ |
||
|
|
|
Sunjammer Major Dude
Registered: Jun 2002 |
Go on, you know you want to, do me a favour |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
no probs...glad to be of help! __________________ |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
Thanks for the help! I think I have a problem. I'm calling this in .onInit, then in .onInstSuccess I'm doing this: My problem is, that on a Win98 machine I got it tested on, the new window didnt open in .onInstSuccess (it works from Start>>run ok). Could it be, that because this machine is slow, the system call is STILL closing IE windows when the .onInstSuccess function is excecuted, therefore resulting in the system call closing THAT window too? To ensure this is not the case, is there a way I can check that the system call has completely finished before proceding? If not, perhaps you may have an idea to over come this anyway? TIA __________________ |
||
|
|
|
Sunjammer Major Dude
Registered: Jun 2002 |
The system call could still be causing Windows to close, but it should only be those that were open when the system call was made. New windows would not receive the close message. |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
You are right Sunjammer. There is absolutely no way this loop closed that window. My guess is that the window never even opened. Try and see if you get an error after that ExecShell command (ClearErrors, ExecShell, IfErrors...). Maybe it can't find iexpolrer.exe for whatever reason. __________________ |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
__________________ |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
__________________ |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
AFAIK, there is no Windows API function that opens an Internet Explorer window. I bet there is some COM class you can use but I have no idea how to use those with System... __________________ |
||
|
|
|
Sunjammer Major Dude
Registered: Jun 2002 |
Well COM just involves calling CoCreateInstance and QueryInterface to get the object you want and then calling methods on it. I'm sure you can use the vtbl directly yourself to call them like you would C functions and so System might be able to do it that way. Not sure really. |
||
|
|
|
simham_uk Junior Member
Registered: Jun 2002 |
__________________ |
||
|
|
|
Last Thread Next Thread
|
WINAMP.COM | Forums > Developer Center > NSIS Discussion > Closing IE Windows |
Forum Rules:
|