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?
LVL 1
frankmorrisonAsked:
Who is Participating?
 
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
 
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
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
frankmorrisonAuthor Commented:
Mirtheil,
any more ideas on how to close all instances of IE without having to Restart?
0
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.