开发者

close all instances of internet explorer

开发者 https://www.devze.com 2023-03-10 03:27 出处:网络
So I was thinking of a way to go about writing a program that closes all instances开发者_C百科 of internet explorer.Would it be better to terminate all iexplore.exe processes using the windows API or

So I was thinking of a way to go about writing a program that closes all instances开发者_C百科 of internet explorer. Would it be better to terminate all iexplore.exe processes using the windows API or enumerate the internet explorer windows and close it that way? (using enumwindows).


I know it's late, but:

https://blogs.msdn.microsoft.com/oldnewthing/20040720-00/?p=38393/

You will only need the first 2 IFs from method RecalcText(). Paste there this code:

HWND hwndWBA;
pwba->get_HWND((LONG_PTR*)&hwndWBA);
InvalidateRect(hwndWBA, NULL, TRUE);
pwba->Quit();
pwba->Release();

It will close all explorers. Not only Internet Explorers, but also folder explorers. Works on desktop (tested on Windows 7).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号