HOWTO: Detecting Whether the Freiburg Patch is Installed

ID: Q176794


The information in this article applies to:
  • Microsoft Internet Explorer (Programming) version 4.0


SUMMARY

It is possible to use script to detect whether a patch has been applied to Internet Explorer. This article explains how to detect whether the Freiburg patch has been installed on an Internet Explorer 4.0 browser.


MORE INFORMATION

Details of the Freiburg Text-Viewing Issue can be found on http://www.microsoft.com/. Search for "Freiburg".

A patch for Internet Explorer is assigned a number. The format of this number is always ";<number>;" This number is valid only for the base product for which the patch applies. The Frieberg patch is number 51 and applies to the Internet Explorer version 4.00. Number 51 for any other version of the Explorer will probably be a different or non-existent patch.

The appMinorVersion will be incremented with each Service Pack. A patch may indicate that a service pack also implements a patch. If Service Pack 1 were to be released for Internet Explorer 4.0, this service pack would include the fix for the "Freiburg" issue.

To make a valid robust detection script for a patch, you must do the following in order:

  1. Check the product version.


  2. Check the service pack level.


  3. Check the patch number.


The following script checks for the existence of the Freiburg patch:
<SCRIPT>
function window.onload()
{
   // This patch only applies to IE 4.00
   if (navigator.appVersion.indexOf("MSIE 4.0;") != -1)
   {
      ServicePackLevel = 0;
      SPIndex = navigator.appMinorVersion.indexOf(";SP");

      // Service Pack 1, if released, will include this fix
      if (SPIndex != -1)
      {
          ServicePackLevel =
                  navigator.appMinorVersion.substring( SPIndex+3,
                  navigator.appMinorVersion.indexOf(";", SPIndex+2));
      }

      // This is IE 4.00 with the Freiburg patch
      if ((navigator.appMinorVersion.indexOf(";51;") != -1) ||
              (ServicePackLevel >= 1))
      {
          alert("You have the patch");
      }
      else
      {
          alert("You do not have the patch");
      }
   }
   else
   {
      // Not IE 4.00 - The patch is not relevant to earlier versions
      // and will be incorporated into later versions
   }
}
</SCRIPT> 

Additional query words: QFE patch

Keywords : kbcode AXSDKScripting
Version : WINDOWS:4.0
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: May 4, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.