Solved

How to restart Internet Explorer during Inno Setup installation?

Posted on 2007-04-04
3
1,742 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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Installations often have prerequisites, such as “Microsoft .Net framework is required for this product”. The usual implementation in MSI installations is system search for a particular registry setting representing the required prerequisite, followe…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

622 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