Microsoft Announces the Death of VBScript
As seems to be their new modus operandi, Microsoft has quietly rolled a hand grenade into the VBA development world with very little fanfare.
It may soon be time to add another headstone to the Microsoft graveyard:
Over on LinkedIn, Jan Karel Pieterse raised the alarm:
I write quite a bit of VBA code. And I try to stay away from external libraries as much as I can. They can cause issues at times and aren't available to all platforms, like Mac. But sometimes, an external library is the most efficient (if not the only) way. For example, I see many implementations where the Windows Scripting library (AKA VBScript) is used.
But check out this: Deprecated features
Soon, it looks as if you can no longer rely on that library being installed on your (customers) computer. That will break many a solution I'm afraid.
Prove me wrong please!
Jan's link takes you to this Microsoft Windows list of Deprecated Features published October 18, 2023. The feature of note is this one:
Feature
VBScript
Details and mitigation
VBScript is being deprecated. In future releases of Windows, VBScript will be available as a feature on demand before its removal from the operating system. For more information, see Resources for deprecated features.
Deprecation announced
October 2023
The "Resources for deprecated features" link above takes you to a page with the following not-particularly-helpful additional guidance:
VBScript
VBScript will be available as a feature on demand before being retired in future Windows releases. Initially, the VBScript feature on demand will be preinstalled to allow for uninterrupted use while you prepare for the retirement of VBScript.
What are "Features on Demand"?
Features on Demand (FODs) are Windows features that can be added at any time. Common features include language resources like handwriting recognition or other features like the .NET Framework (.NetFx3). When Windows 11 or Windows Server needs a new feature, it can request the feature package from Windows Update.
You can also preinstall FODs so they're ready if a user needs them. FODs are distributed as .cab files on the Languages and Optional Features ISO and you can use DISM to add one or more FODs to a Windows image. If you're using the Languages and Optional Features ISO to preinstall FODs, make sure you're using the ISO that matches your Windows image version.
Features on demand, then, are very easy to install in Windows, but most of the time they do NOT come pre-installed.
Impact on VBA Development
This raises several important questions for VBA developers, as many commonly used references are related to VBScript and could be in jeopardy, including the following:
- Microsoft Scripting Runtime: scrrun.dll
- Microsoft VBScript Regular Expressions 5.5: vbscript.dll
Microsoft Scripting Runtime
The Scripting Runtime includes two key features:
Microsoft VBScript Regular Expressions 5.5
As you might have guessed, this reference provides access to the following key feature:
(Formerly?) Safe References
I use the Scripting Runtime in every single one of my Access applications. I use the VBScript RegEx reference in most of my Access applications.
In fact, these two references are so ubiquitous in both my applications and on my users' computers, that they are the top entries on my "Safe References List":
Now, to be fair, I do not know whether these two libraries will be removed from Windows along with VBScript. We also don't know what sort of timeline Microsoft has in mind for VBScript's demise. Honestly, there are a lot more questions than answers at this point.
If this planned deprecation goes through, though, I might have to update one of my articles, which would be a real tragedy. Almost (but not quite) as big a deal as having to REWRITE DOZENS OF ACCESS APPLICATIONS!!!!!!
To quote Jan Karel Pieterse, "Prove me wrong please!"