DLL hell on Windows 2000 - or, how not to install an app five years ago

A client recently contacted me regarding a legacy application, written when I was at a previous company, that was now refusing to save customer records due to a failure to validate e-mail addresses.  The application runs on Windows Professional 2000, and is a web application with minimal ASP content, and a HTML generation engine written in Visual Basic 6.0.  From the Application Log error messages the client provided it was clear  that the issue was with a COM object, VBScript Regular Expressions v5.5.

Fortunately I have a Windows 2000 Pro Virtual PC image which includes SP3, IIS and VB6.  In the Visual Basic 6.0 code was an early binding (remember COM objects?) requiring a specific v5.5 version of the regular expression library.  The odd bit, was that this bit of code has been running for five years.  All the client did was backup the system, reinstall on new hardware (the old server was dying) and apply Windows 2000 Service Pack 4 to bring the system up to date.

I did a quick diagnostic program in VB6, with both early and late binding to the regular expression library.  Both worked on my Windows 2000 image, even after installing SP4 and all the Windows Updates released in the past five years. Hmmm.

So on site I went. The same diagnostic program that worked on my Windows 2000 image failed on the live system.  It worked in late binding, but not early binding when the v5.5 version was specified.  A bit of digging around revealed the C:\WINNT\System32\vbscript.dll was an old version, not v5.5 as on my image.  In the end, I could either recompile ancient code with late binding to use the old DLL (not ideal, and certainly not tested), or update the vbscript.dll, which might require installing IE5.5 (once I sourced an installer).

Not really wanting to install IE 5.5 just for one library, I decided I'd just update the vbscript.dll and use regsvr32.exe to register it on the system.  Up pops a great dialog - 'Windows System Protection has detected a system DLL being updated, please install the SP4 CD to reinstall the original version'. Ah, so it was SP4 which broke the application.

So, here is what we must have done FIVE years ago.  Our systems had VB6 installed, which would have required MSDN Oct 2001 to provide the help files, and that would have required IE 5.5.  So when we wrote the software it used v5.5 of the library because that was on our development systems.  When we installed on the live system, v5.5 wasn't there, so I'm guessing we just copied the DLL and used regsvr32.exe to install.  When SP4 was installed, it knew that the DLL didn't match the version of IE 5.0 and so replaced it with the correct version.

Every now and then some grizzled admin ask what's so great about .NET and couldn't you still use VB6?

No thankyou.

Print | posted on Thursday, September 11, 2008 12:34 PM

Comments on this post

# re: DLL hell on Windows 2000 - or, how not to install an app five years ago

Requesting Gravatar...
You can download and update with out installing IE, for versions greater than 5.5 .

5.7
http://www.microsoft.com/downloads/details.aspx?FamilyID=c03d3e49-b40e-4ca1-a0c7-cc135ec4d2be&DisplayLang=en

5.6
http://www.microsoft.com/downloads/details.aspx?FamilyID=c717d943-7e4b-4622-86eb-95a22b832caa&DisplayLang=en

this updates just the scripting engines.
Left by Toby Henderson on Sep 11, 2008 2:46 PM

Your comment:

 (will show your gravatar)