Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2486
  • Last Modified:

Terminate all instances of IE in Vista using InnoSetup

I need to terminate all instances of IE in Vista in my Inno Setup script.  Can someone give me the code that will make this happen?
0
frankmorrison
Asked:
frankmorrison
  • 3
  • 3
1 Solution
 
mirtheilCommented:
Why do you need to terminate the process?  If a component you're updating is in memory, InnoSetup will replace it on restart.  

You might look at AppMutex. It won't stop IE but will send a message to the user to close all instances.
0
 
frankmorrisonAuthor Commented:
When an instance of Internet Explorer 7 is opened, the ieuser.exe process is also started. This ieuser.exe process is a user privilege broker that provides a set of functions to allow programs to save files to areas outside of low integrity areas.

My software is an ActiveX controlled that requires elevated priviledges and it is registered as a broker with Internet Explorer and adds entries to the following Elevation Policy in the system registry:

HKLM\SOFTWARE\Microsoft\Internet Explorer\Low Rights\ElevationPolicy\

However, Internet Explorer doesn't recognize that my Activex control has registered as a broker until the ieuser.exe process has restarted. If Internet Explorer is reopened while the same ieuser.exe process is still running, and a user attempts to view content using my ActiveX Control, they may be prompted with multiple Protected Mode security warnings.

0
 
frankmorrisonAuthor Commented:
Mirtheil,
any more ideas on how to close all instances of IE without having to Restart?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
mirtheilCommented:
Everything I'm finding says that it's a bad idea to try to kill IE however I did find one suggestion to use FindWindowByClassName  and PostMessage (with WM_QUIT) or PostQuitMessage.  
I haven't tried it so I don't know if it would work in your situation.  
0
 
frankmorrisonAuthor Commented:
Mirtheil,
 Have you tried this? I would appreciate it if you did.
0
 
mirtheilCommented:
I have not tried it and to be honest, I'm not sure when I would be able to try it.  

You could always add the "AlwaysRestart" directive to the InnoSetup script to force a restart after the install is done.  
0
 
matrixnzCommented:
Hi Frank

Have you considered using AutoIT or PSKill, personally I find AutoIT the easiest using something like the script below, once compiled the .au3 script into an executable you could either call it from {src} or from {tmp} within InnoSetup.

Hope that helps.

Cheers
#NoTrayIcon
 
While 1
	$PEXISTS = ProcessExists("iexplore.exe")
	If $PEXISTS = 0 Then ExitLoop
	ProcessClose($PEXISTS)
WEnd

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now