Solved

How to restart Internet Explorer during Inno Setup installation?

Posted on 2007-04-04
3
1,685 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
Comment Utility
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
Comment Utility
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
Comment Utility
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 Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
I have been scripting applications way too long and can never remember how to create an ISS file.  So I decided to write this article to act as my own knowledge base for future reference, and hope you will also benefit. An ISS file is a response …
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now