Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to restart Internet Explorer during Inno Setup installation?

Posted on 2007-04-04
3
Medium Priority
?
1,758 Views
Last Modified: 2008-02-07
My inno setup installs an Internet Explorer toolbar and I need to be able to restart IE from Inno Setup.  Does anyone know how to do this?
0
Comment
Question by:frankmorrison
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Expert Comment

by:mirtheil
ID: 18854500
Why do you need to restart just Internet Explorer?  If the toolbar is already installed and in memory, you should use the "restartreplace": flag and it'll be replaced when the machine is restarted.
0
 
LVL 1

Author Comment

by:frankmorrison
ID: 18854669
I don't need to restart the entire machine. I just need to restart IE.
0
 
LVL 18

Accepted Solution

by:
mirtheil earned 2000 total points
ID: 18854726
I found the following (at http://news.jrsoftware.org/news/innosetup/msg52880.html) but haven't tested it.  

Page1 := CreateCustomPage(wpWelcome, ...
RadioButton1 := TRadioButton.Create(Page1);
RadioButton1.Parent := Page1.Surface;
RadioButton1.Caption := 'Close all Internet Explorer windows automatically';


function NextButtonClick(CurPageID: Integer): Boolean;
var
  hWnd, prevhWnd, i: Integer;
begin
  if (CurPageID = Page1.ID) and RadioButton1.Checked then begin
    prevhWnd := 0;
    hWnd := FindWindowByClassName('IEFrame');
    while (hWnd > 0) do begin
      PostMessage(hWnd, 16, 0, 0);
      prevhWnd := hWnd;
      hWnd := FindWindowByClassName('IEFrame');
      if (prevhWnd = hWnd) then begin
        for i := 1 to 10 do begin
          hWnd := FindWindowByClassName('IEFrame');
          if (prevhWnd = hWnd) then
            Sleep(100);
        end
        if (prevhWnd = hWnd) then
          hWnd := 0;
      end
    end
  end
  Result := True;
end;

0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question