Solved

How to restart Internet Explorer during Inno Setup installation?

Posted on 2007-04-04
3
1,710 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
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

One of the frequent problems with the installations is when some file or registry entry is not removed from the system upon un-installation of the product. Clean removal is always highly desirable. One major reason for that is badly authored inst…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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