4

Our VB6 application relies heavily on the use of scrrun.dll (Windows Scripting Host). Until a year ago we used to deploy this dll with our installer. Since the Windows Scripitng Host is supposed to be part of Windows we removed the dll from the installation package. However, now and then surface customers who have a non functional scrrun.dll on their system and we have to help them reinstall or reregister it.

So, should we put the scrrun.dll back in the installation package? Should we perform some check on installation? Or should we just live with the fact that we have to provide hands on support to some of our customers to set their systems right?

Dabblernl
  • 15,831
  • 18
  • 96
  • 148
  • 3
    These are no doubt customers that ran an installer some time ago that replaced the operating system's version of scrrun.dll. Replacing these kind of DLLs is somewhat attractive, somebody else gets the support call. Losing a valuable contract when they find out is not, it is up to you to weigh the consequences. – Hans Passant Aug 18 '12 at 13:43
  • If you can manifest your VB6 app and install scrrun in side-by-side fashion I think that would be appropriate. Totally isolated and immunized from these system-wide issues. Obviously you'd need to test such a configuration well. – StayOnTarget Apr 18 '18 at 13:32

1 Answers1

5

Don't try to deploy these libraries as part of a normal setup.

Microsoft Scripting Runtime must be installed through the use of a self-extracting .exe file. For versions of Scripting Runtime mentioned at the beginning of this article, the only way to distribute it is to use the complete self extracting .exe file located at the following locations...

It is possible that some users employ an older anti-malware suite, many of which tried to disable scripting. It is more likely though that some users have managed to break their Windows installation, either themselves or by using applications improperly packaged to try to include these libraries - and blindly remove them from the system on uninstall (cough, cough - Inno).

The libraries involved have been tailored code for some time. This is why the ancient .CAB file was "recalled" long ago. There is no single copy of them intended to run on any random version of Windows, and there are no redist packs for any modern version of Windows. The correct fix is a system restore or repair install.

While this can't be blamed directly on InnoSetup because it is the result of poorly authored scripts it is frustrating enough and common enough that I won't cry when its signature is added to anti-malware suites. There are just too many poorly written examples loose in the wild copy/pasted by too many people.

I spend plenty of time undoing the damage caused by uninstalls of these applications and have grown quite weary of it. Where possible I use isolated assemblies now in self-defense, which helps a lot. Windows File Protection is getting better about preventing abusive action for system files too.

But in general you are much better off avoiding any dependency on scripting tools in an application. There isn't very much that they can do as well as straight code anyway, though it may take some time to write alternative logic.

Bob77
  • 13,167
  • 1
  • 29
  • 37
  • 3
    Well, I find the Dictionary Class to be very useful. – Dabblernl Aug 18 '12 at 14:07
  • In many cases you can use a Collection, fabricated Recordset, custom hash table or collection class, or *Francesco Balena's classic HashTable class* at http://www.devx.com/vb2themax/Tip/19307 but if you want the Scripting.Dictionary then you'll have to weather the storm. – Bob77 Aug 18 '12 at 21:29