IE7 Standalone Launch Script

As of IE7 Beta 3, this launch script no longer works. I've released a new version which works with newer IE7 versions (including RC1). Read about it here, then download it here


UPDATES
8/31/2006 - Version 1.6 works with IE7 RC1. Grab it here.
7/26/2006 - Version 1.5 works with IE7 Beta 3, but requires a few more files so I've bundled it into a zip file for distribution. Grab it here.
6/29/2006 - This isn't working with IE7 Beta 3 yet. I'll have to test it out more and probably release a new version.
2/8/2006 - Version 1.4 temporarily updates the IE version to work with conditional statements (<!--[if lt IE 7.0]>) based on a recommendation by Thomas Meinike. 3/21/2006 - This build has been tested with the IE7 B2 Preview released on 3/20/2006. It works, in that it allowed me to browse sites in IE7 without messing up IE6 or my default browser association. However, I noticed high CPU usage while browsing and had to close IE7 using the task manager when I was through - it didn't respond to that little red X thing. I believe these are minor inconveniences compared to running a separate virtual machine just to check how a site looks. Obviously, this build of IE7 just came out yesterday so I haven't put this through rigorous testing.
2/2/2006 - Version 1.3 works with IE7 Beta 2 Preview.

The IE6 Cumulative Security Update (Dec 13) broke the IE Standalone Mode that's been around since IE3 and is a big help in designing for forward compatibility. The IE team's response is that the standalone mode is not supported, so do a full install of the IE7 beta if you want to use it. After a short bit of grumbling, I'll tell you how you can still run IE7 in standalone mode despite the security update.

I hope the "by design" solution is a temporary workaround that will be fixed soon, for a lot of reasons:

  • It's going to be really annoying for web developers to have to test on IE6 and IE7 if they can't both run on the same machine
  • It's not the developers' fault
  • Other browsers allow running multiple versions on the same machine
  • IE is making a lot of breaking changes between versions 6 and 7
  • IE's "standard defiance" virtually required (or highly encouraged) non-standard HTML / CSS / Javascript
  • The standalone mode, unsupported or not, has worked for like 10 years now

The symptoms of this recent problem are interesting - in my case, every time I clicked a link in IE it would open in Firefox (my default browser). There are lots of other strange effects other people are seeing, such as blank windows, hanging, and a ringing in the ears. The problem is that IE7 writes a registry key that causes IE6 to shift to an also undocumented "evil" mode, and it's necessary to delete this registry key after running IE7 and before running IE6 with the December 05 cumulative security update.

Okay, on to the solutions...

If you just want to delete the registry key and follow the rules (don't use IE7 at all, take the plunge and use IE7, or use a virtual machine with VirtualPC or VMWare), then you can just copy the following text into notepad, save it as ie7fix.reg, and double-click it. Note: this is not the launch script, it's just a cleanup in case you've used the launch script before and it's causing problems.

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\CLSID\{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}]

But if you'd like to keep running IE7 in standalone mode, you can use the following DOS batch script. You'll use the batch file to launch IE7, and it will stay active as long as IE7 is running. As soon as you shut IE7 down (that red X button or File / Exit), the batch file will clean up after IE7 so your other browsers will continue to work.

How to use the IE7 Launch Script:

  1. If you already have IE7 set up for standalone mode, skip to step 4.
  2. Download the IE7 Beta Install from MSDN. I know there are versions of this floating around the intarwebs, which may or may not carry the ebola virus.
  3. Open the install file with a decompression program like WinRAR (yep, it's an EXE, but it's a self extracting EXE) and extract them to a folder. Alternatively, you can just run the EXE, make a copy of the files which are extracted in the first step, and cancel the install. I was too chicken to do this on my work computer. There were some other steps to the setup which I've included in the batch file below - if you want to know what they are, read the original info here.
  4. Copy the text below to notepad and save it as IE7.bat in the same folder you're setting up the standalone IE7 copy.
  5. When you want to run IE7, double click IE7.bat - it pops up a DOS window that will hang around as long as IE7 is running so it can clean up after it (by deleting that pesky registry key) when you close IE7. Don't close the DOS window down or your pancreas will implode.
  6. When you're done with IE7, just shut it down. The DOS window will clean up that pesky registry key and delete the standalone files, then disappear. If you shut IE7 down and the DOS window hangs around, just close it and run it again.
Update - If setting up the launch script is more work than you'd like, and you don't mind downloading from a non-Microsoft source, you can easily find zipped IE7 redistributions with the launch script already set up.

@ECHO OFF
TITLE IE7 Launcher 1.4

ECHO 
IE7 STANDALONE LAUNCHER 1.4
ECHO 
Updated for IE7 Beta Preview
ECHO.
ECHO Do not close this window or it will not clean up after itself properly.
ECHO You can pass a URL into this batch filelike this:
ECHO ie7.bat www.microsoft.com
ECHO.
ECHO More info here: http://weblogs.asp.net/jgalloway/archive/2005/12/28/434132.aspx
ECHO.
ECHO When you close IE7this will remove the registry key and shut itself down.
ECHO.
ECHO Setting up IE7 for standalone mode...
PUSHD %~dp0

ECHO Removing IE7 registry key and set the version vector to "7.0000".
%TEMP%.\IE7Fix.reg ECHO REGEDIT4
>>%TEMP%.\IE7Fix.reg ECHO.
>>
%TEMP%.\IE7Fix.reg ECHO [-HKEY_CLASSES_ROOT\CLSID\{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}]
>>
%TEMP%.\IE7Fix.reg ECHO [-HKEY_CLASSES_ROOT\Interface\{000214E5-0000-0000-C000-000000000046}]
>>
%TEMP%.\IE7Fix.reg ECHO [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version Vector]
>>
%TEMP%.\IE7Fix.reg ECHO "IE"="7.0000"
>>%TEMP%.\IE7Fix.reg ECHO.
:: Merge the REG file to delete the IE7 standalone entry
REGEDIT /%TEMP%.\IE7Fix.reg

REN SHLWAPI.DLL SHLWAPI.DLL.BAK
TYPE NUL IEXPLORE.exe.local
ECHO Running IE7...
iexplore.exe "%1"

:: Merge the REG file to delete the IE7 standalone entry
REGEDIT /%TEMP%.\IE7Fix.reg
:: Delete the temporary REG file
DEL %TEMP%.\IE7Fix.reg

ECHO Removing IE7 standalone files...
REN SHLWAPI.DLL.BAK SHLWAPI.DLL
DEL IEXPLORE.exe.local

:: Set the old version vector "6.0000".
%TEMP%.\IE7Fix.reg ECHO REGEDIT4
>>%TEMP%.\IE7Fix.reg ECHO.
>>
%TEMP%.\IE7Fix.reg ECHO [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version Vector]
>>
%TEMP%.\IE7Fix.reg ECHO "IE"="6.0000"
>>%TEMP%.\IE7Fix.reg ECHO.
REGEDIT /
%TEMP%.\IE7Fix.reg
DEL %TEMP%.\IE7Fix.reg

POPD
ECHO 
Completeclosing...

Please leave any comments here.

91 Comments

Comments have been disabled for this content.