IE7 & SW 2005 - Follow up
Editted to Add:
Due to several attemps to spam the comments, they are disabled on this post.
If you want to share your opnions and information, please, do so at paulstsmith (at) gmail (dot) com.
I sent an email to Symantec today about the error I got after installing IE7, and I got an automated message that say they will reply in 24 to 48 hours.
So while I'm waiting I did some research about this error and some digging in the System Works.
I took a good look at the error message that stated that the error has occurred at this URL: res://fwui.dll/ruleSummary.htm
.
Well, it says in almost plain English that the error occurred in a Resource in the fwui.dll
.
The next thing I did was to search for the said file and then I started my Visual Studio 2005 and opened the file. And there it was:
fwUI.dll
Bitmap
Cursor
Dialog
HTML
Icon
"REGISTRY"
String Table
"TYPELIB"
Version
Everything I needed to find out what was wrong.
I went straight to the HTML branch and took a look at it.
There are several items there and the one I was looking for: “RULESUMMARY.HTM
”.
Reading this file I discovered that it is a pretty simple HTML file, with not much of a thing to look at anyway. But there are some scripts and the most interesting was named RuleSummary.js
.
Opening this file and referring to the error message I got I went straight to the line of error (476), and discovered that it was inside a block code that should be only executed if the IE was lower than 5.
I scratched my head. Was IE7 reporting a wrong version number?
That didn't seem right. But I tested anyway and it reported 7 sure enough.
Therefore the error should be in the code I was looking.
The test for the IE version was:
if (g_IEVer < 5)
So I went looking for the assignment of g_IEVer
and I found it as being:
var g_IEVer = GetIEVersion();
But no sign of the GetIEVersion
function in the code I was looking at.
I went back to the HTML file I looked at first. There was another interesting script there by the name shared.js
in another resource file, the niscmnht.dll
.
I opened this file and searched for the shared.js
script. And then I looked for the GetIEVersion
function. Where I quickly discovered the error.
function GetIEVersion()
{
// convert all characters to lowercase to simplify testing
var agt = navigator.userAgent.toLowerCase();
// Note: On IE5, these return 4, so use is_ie5up to detect IE5.
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
// BROWSER VERSION
var is_ie = (agt.indexOf("msie") != -1);
var is_ie3 = (is_ie && (is_major < 4));
var is_ie4 = (is_ie && (is_major == 4) &&
(agt.indexOf("msie 5.") == -1));
var is_ie4up = (is_ie && (is_major >= 4));
var is_ie5 = (is_ie && (is_major == 4) &&
(agt.indexOf("msie 5.") != -1) );
var is_ie5up = (is_ie && !is_ie3 && !is_ie4);
var is_ie6 = (is_ie && (is_major == 4) &&
(agt.indexOf("msie 6.") != -1));
if(is_ie6)
return 6;
else if(is_ie5up)
return 5.5;
else if(is_ie5)
return 5;
else if(is_ie4)
return 4;
else if(is_ie3)
return 3;
return -1;
}
Do you see the error?
There is no test for IE7. Worse, it could have been done much more easier with regular expressions.
A better approach with the same results and upgradeable to ANY version of the IE could be:
function GetIEVersion()
{
var agt = navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_ie = (agt.indexOf("msie") != -1);
var is_ie3 = (is_ie && (is_major < 4));
// It's not IE so we don't care
if (!is_ie)
return (-1);
// It's IE3 report it
if (is_ie3)
return (3);
// It's IE4+ so we can use RegExp
var rxIE = new RegExp("msie\\s(\\d+.\\w+)","ig");
var arIEResult = rxIE.exec(agt);
// arIEResult[0] contains the whole match
// arIEResult[1] contains the first matching group
// in our case the full version
//
// We use parseFloat because we want a number
return (parseFloat(arIEResult[1]));
}
Unfortunately I can't edit the file without risking my whole System Works, but now it's pretty easy for the folks at Symantec to fix the problem A.S.A.P.
Editted to Add:
You can can read the Symantec reply here.
Editted to Add:
Several people have in the past asked me for a fixed version of the niscmnht.dll file. However I wasn't able to provide at that time due some personal conflicts.
I was trully hoping that Symantec would sometime fix this darn file. But after more than three years since the first publication of this post, no such thing happened.
So I'm publishing a fixed version of this file here.
Simply unzip the fixed file over the old one.
If in some happenstance the file is in use, unzip it on another folder, boot up in Security Mode, and copy the file over the old one.
As always, remember to backup your original file BEFORE copying it over.
This file is provided “AS IS”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement.
In no event I shall be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software
Use it at your own risk.
Comments
Post a Comment