How to Create a Silent, Minimal Install of Microsoft IE5 for Products using Microsoft HTML Help.

By Paul A. O’Rear

Scenario: Your company is releasing a product that wants to have all the latest and greatest Microsoft Windows features like HTML Help, but you don’t want to trample on your end-user’s choice of browser or even let them know that they’re actually installing some Internet Explorer 5 components in order to enable HTML Help to work. How do you do it?

The Process

In order to successfully do a true silent minimal install you must evaluate "how silent is silent" for your particular user base. Is your only interest that the IE installation be as inobtrusive visually during the install process, or must IE be as invisible as possible both during the install and after it’s been installed? Is it OK for IE to be fully installed along with all the file associations changed to load the IE browser when a user double-clicks on an HTML file? Is it OK for there to be an IE icon on the desktop and Start menus after it has been installed? Is it OK for there to be various messages displayed when the user reboots? Is it OK for there to be an Internet Connection Wizard on the desktop after installation? For some companies distributing IE for HTML Help purposes, some of these issues may be of more significance than others.

There are essentially 3 approaches to coming up with a setup for any IE5 installation. They are 1) using a command-line approach, 2) using an IE5-specific batch file approach and 3) using the IEAK Internet Explorer Customization Wizard. For the purposes of this article, only the first approach will be discussed. The command-line approach offers a lot of flexibility, and may perhaps be the most convenient approach when called by an installation program. Also, most of the issues mentioned above may be addressed by the use of various switches in the command-line. Some of the issues require modifying registry entries after installation and before reboot. In the following paragraphs we’ll discuss the various switches that may be used on the command-line as well as the registry settings that may be required for a completely silent install.

 

The Relevant Command-line Switches

IE5SETUP.EXE and IE5WZD.EXE which are both used in an IE5 setup both support quite a variety of command-line switches. For the purposes of this article I won’t cover all of the command-line switches here, but complete documentation may be found in the Internet Explorer Administration Kit (IEAK) available from Microsoft at the IEAK site. Examples of use of the switches will be given following their presentation.

 

IE5SETUP.EXE switches (referenced as IExpress switches in the IEAK documentation):

For an absolutely silent setup, you should use the /Q:A switch in your command-line.

This switch and what follows it specify the "meat" of the command-line switches. You follow the /C: switch with a single long quoted string that will include another quoted string which may seem confusing at first. The following is an example:

/C:"ie5wzd.exe /M:0 /S:""#e"" /Q /R:N /X"

If you look at the first double quote after /C: as the beginning of the string and the double quote following /X as the end of the string, you’ll understand that everything between those quotes is part of the /C: switch. This is important to get correct - there should be no space between the /C: and the initial double quote.

 

IE5WZD.EXE switches (also known as Internet Explorer switches - used to control the bulk of the installation options):

Similar to the IE5SETUP.EXE switches, if you wish an absolutely silent install you should use the /Q:A switch.

For the purposes of just installing enough of the IE5 components to support HTML Help, /M:0 would be the choice to use.

This switch looks sort of confusing due to the doubled double-quotes around the #e. The double quotes are necessary, because this switch is a string within the larger string that makes up the IE5SETUP.EXE /C: switch mentioned above; if single quotes were used, the string portion of the /C: switch would be interpreted to have ended just before the #e, which is not what we want. #e is used here as a sort of macro that fills in the complete path and name of IE5SETUP.EXE. It is used to specify the location of the IE5 setup files (.cab files). IE5WZD.EXE looks in the same location that IE5SETUP.EXE is being run from and looks there first to find the component .cab files and to see if additional .cab files need to be downloaded. I was told that the IEAK documentation for the /S: switch is out of date, which seemed to indicate that you could pass a URL as the string value to this switch. The long and short of it - always use /S:""#e"".

In most cases it’s desirable to be able to continue right after the installation into launching the application. In my experiments on installing the IE5 components onto a very clean Windows95 retail version machine (the original version - not OSR2) which had no IE components from any version previously installed, I was not able to accomplish launching an HTML Help .chm file without rebooting. Trying to directly register the various HTML Help components with the operating system using regsvr32.exe or running HHUPD.EXE immediately following the IE5 setup (but before rebooting) also did not work. So though it may be desirable to prevent rebooting, it may indeed be necessary if you want your users to have immediate access to your HTML Help help system from your application.

The /X: switch is the most significant for controlling the degree of control that IE5 will take over the end-users system with regard to whether IE5 will become the default browser, or whether an IE icon will show up on the desktop, etc. For those wishing the most unobtrusive installation of IE for only the purposes of displaying HTML Help content, the /X switch is the one to use.

 

Command-line switch examples:

OK - so you’re waiting for the magic combination of switches that will give you an absolutely silent install - Well here it is!

ie5setup.exe /Q:A /C:"ie5wzd.exe /M:0 /S:""#e"" /Q:A /R:N /X"

This says:

  1. do a quiet extraction of the setup files (/Q:A),
  2. launch the Internet Explorer setup wizard (/C:),
  3. use the minimal install mode (/M:0),
  4. the path and location of all the setup files is located at the same place as the IExpress Wizard - ie5setup.exe (/S:""#e""),
  5. do the rest of the IE5 setup silently (/Q:A),
  6. do not reboot (/R:N), and
  7. don't associate IE5 with any files or web protocols (/X).

ie5setup.exe /Q:A /C:"ie5wzd.exe /M:0 /S:""#e"" /Q:A /X"

This is identical to the previous example except for the lack of the /R:N switch.

 

Registry Settings - So you thought you were finished?

When I finally got the formula above, I was excited because it looked like I had succeeded in a truly, absolutely, positively silent install - but then I rebooted. What are these "Personalizing IE5 settings" and "Windows Update" dialogs, and what's this "Connect to the Internet" shortcut on my desktop? Now I got frustrated. "This ain't no steenking silent install!" Thankfully, the IE team once again came to my rescue. The thing that initially frustrated me the most was the "Connect to the Internet" shortcut, otherwise known as the Internet Connection Wizard (ICW); for that reason we'll deal with that next.

 

Getting rid of the Internet Connection Wizard

Internet Connection Wizard IconInternet Connection Wizard Icon

Whether this gets installed or not appears to be dependent on the version of Windows you're installing IE5 on. I did most of my tests on the virginal Windows95 Gold Retail version - pre-Internet Explorer. No matter what I did I initially could not get IE5 to install without putting that shortcut on the desktop. The proper way to do this I was eventually informed is to still do a minimal install (/M:0), but to delete the following registry entry as part of your install routine before rebooting:

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"^SetupICWDesktop"

 

Getting rid of the "Windows Update" dialog

Windows Update DialogWindows Update Dialog

To get rid of this dialog, which appears when the system is rebooted, you need to modify a registry entry after the IE5 setup has completed, but before the system is rebooted. The value needs to be set to 00000ab8. Setting this value only affects the visibility of this dialog; Windows will actually do the processing of the stuff that is normally associated with this dialog whether it is shown or not. (probably a good thing)

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx]
"Flags"=dword:00000ab8

 

Getting rid of the "Personalized Settings" dialog

Personalized Settings dialogPersonalized Settings dialog

Disabling this dialog may have adverse effects and you should weigh out the potential problems very carefully. The essence of the problem is that if you disable this dialog you are not just preventing it from being displayed, but are also disabling some crucial aspects of the IE5 setup; specifically with regard to updating a previous IE installation. If you're installing IE5 on Win95 OSR2, Win98, and WinNT 4.0, all of which already install various versions of IE as part of the default installation of the OS, then you must allow this dialog to be displayed so that updates to the users personalized settings from earlier versions of IE get carried across properly. Basically the only OS that you can safely disable this dialog for is the Win95 original retail version, which did not ship with IE as part of the OS, and even then you should follow the following instructions very carefully .

To disable this dialog, set the following registry entry to "Y" and after the user has rebooted remove the key. This key does not get removed automatically, which means that if you install the basic IE5 components on a Win95 retail version machine and do not remove this key, and the user at a later time installs IE5 or above, they will not get any of the personalized settings migrated. This will not be a good thing.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components]
"NoIE4StubProcessing"="Y"

**NOTE** - The IE team is aware that the presence of this dialog does not really constitute an absolutely silent install and intends to provide a mechanism that will eventually allow supression of this dialog for all OSes without the adverse effects. Watch this page for updates.

 

HTML Help Issues

Ensuring the most current version of HTML Help

As the versions of Internet Explorer and HTML Help are not always in sync, it's wise to include the latest copies of HHUPD.EXE for the languages you are supporting in your install package. You can obtain the latest HTML Help redistribution files (HHUPD.EXE) from the HTML Help download page. After you have successfully installed IE5, you should then run HHUPD.EXE as part of your application’s installation procedure. HHUPD.EXE also supports a /Q switch similar to the IE setup programs that allows the installation of the HTML Help components in a "quiet" mode.

 

To reboot or not to reboot - that is the question

When testing the IE5 installs (along with installation of HHUPD.EXE) on various versions of Windows 95 and 98 I found that there were a few occasions where you would absolutely have to reboot Windows before you’d be able to view an HTML Help .chm file, or before it would be acceptable.

All other cases seemed to work fine.

It's generally advisable and Microsoft’s recommendation to require the user to reboot after IE is installed due to the fact that the IE components are either not actually completely installed or registered until a reboot occurs.

 

Wrap-up

That was quite a lot of information! It took a bit of work to get the answers, but hopefully it will help you get your product out the door and installed in the way that you really desire. If you have any specific questions with regard to what’s been presented here, please feel free to email me at pao@helpfulsolutions.com and I’ll do my best to either answer directly or obtain the answer to your question. If you have questions regarding licensing issues for use of IE5 for your product, please visit the ISV license page of the IEAK web site and address your questions directly to Microsoft through the channels they’ve provided.

 

What a long strange trip it’s been (Acknowledgements)

At various times, talking with people from Microsoft I’ ve heard that Microsoft operates like about 30 small startup companies, where each is doing their own thing, trying to cooperate with each other, but not a lot of cross-discussion between them. Well, if my experience in trying to nail down the details of how to accomplish this silent install is anything to go on, I can certainly attest to those statements. I first attacked the IEAK documentation directly, then when that didn’t supply the answers I needed, I approached people on the IE team and got some closer answers. When those answers didn’t quite work, I approached them again and got more specific answers requiring a couple undocumented tricks. Finally, I needed to approach the HTML Help team about some specifics regarding getting HTML Help to work after a silent IE install, which also required some iterations of email exchanges. I want to express appreciation to all those involved at Microsoft, especially Tom Yaryan, Peter Wassmann, Jordan Fravert, Peter Plamondon, and Shane McRoberts, who helped me to finally come up with the details needed. Also special thanks to fellow MVPs Robert Chandler and David Liske - Robert performed extensive testing of the silent install on the various versions of the Windows OSes including the many international flavors, and David kindly provided the graphics of the various dialogs.