VBScript deprecation: Timelines and next steps
Published May 22 2024 07:00 AM 16.4K Views
Microsoft

Scripting options for web development and task automation are modernizing. To provide you with the most modern and efficient options, we are replacing VBScript with more advanced alternatives such as JavaScript and PowerShell. Find out what VBScript deprecation means for you and how you can get ready.

What is VBScript?

Visual Basic Scripting Edition, commonly referred to as VBScript, is a lightweight scripting language first introduced by Microsoft in 1996. The language has been available as a system component in Windows OS and has been widely used for automating tasks and controlling applications on Windows-based systems. It's often embedded within HTML pages to add dynamic interactivity and functionality to web pages and is commonly used in conjunction with Microsoft technologies like Active Server Pages (ASP) and Windows Script Host (WSH). However, with the advancement of technology, more modern and efficient options are now available.

Why is VBScript deprecated?

Technology has advanced over the years, giving rise to more powerful and versatile scripting languages such as JavaScript and PowerShell. These languages offer broader capabilities and are better suited for modern web development and automation tasks.

Tip: Deprecation is a stage in the product lifecycle when a feature or functionality is no longer in active development and may be removed in future releases of a product or online service. It’s a gradual process that can span a few months or years. The deprecated feature is usually meant to be replaced by something better, more advanced, or more functional. The feature will typically continue to work and is fully supported until it's officially removed. After removal, the feature or capability will no longer work. Removing a deprecated component helps reduce complexity while keeping you secure and productive.

VBScript deprecation plan

Considering the decline in VBScript usage in favor of more modern web technologies, we have developed a phased deprecation plan for VBScript. Let's review the timeline of these changes.

In October 2023, we announced our commitment to providing the best and most efficient experiences by gradually deprecating VBScript. Beginning with the new OS release slated for later this year, VBScript will be available as features on demand (FODs). The feature will be completely retired from future Windows OS releases, as we transition to the more efficient PowerShell experiences.

Deprecation will occur in three phases.

thumbnail image 1 captioned A visual timeline of important dates for VBScript deprecation phases.A visual timeline of important dates for VBScript deprecation phases.

Phase 1

In the first phase, VBScript FODs will be pre-installed in all Windows 11, version 24H2 and on by default. This helps ensure your experiences are not disrupted if you have a dependency on VBScript while you migrate your dependencies (applications, processes, and the like) away from VBScript. You can see the VBScript FODs enabled by default at Start > Settings > System > Optional features.

thumbnail image 2 captioned Screenshot of Windows System Settings shows VBScript installed under Optional features.Screenshot of Windows System Settings shows VBScript installed under Optional features.

Phase 2

Around 2027, the VBScript FODs will no longer be enabled by default. This means that if you still rely on VBScript by that time, you’ll need to enable the FODs to prevent your applications and processes from having problems.

Follow these steps if you need to continue using VBScript FODs:

  1. Go to Start > Settings > System > Optional features.
  2. Select View features next to “Add an Optional feature” option at the top.
  3. Type "VBSCRIPT" in the search dialog and select the check box next to the result.
  4. To enable the disabled feature, press Next.

thumbnail image 3 captioned Screenshot of a dialog box for adding an optional feature with a checkbox next to VBScript.Screenshot of a dialog box for adding an optional feature with a checkbox next to VBScript.

Phase 3

VBScript will be retired and eliminated from future versions of Windows. This means all the dynamic link libraries (.dll files) of VBScript will be removed. As a result, projects that rely on VBScript will stop functioning. By then, we expect that you’ll have switched to suggested alternatives.

VBA projects that use VBScript

Visual Basic for Applications (VBA) allows users to automate repetitive tasks and customize functionalities within Microsoft Office suite. This includes Excel, Word, PowerPoint, Access, and some other applications. With VBA, you’ve been able to write scripts (macros) to manipulate data, create custom forms, automate reports, interact with other applications, and perform various other tasks to streamline workflows and enhance productivity.

Currently, VBScript can be used in VBA for two scenarios:

  • Scenario 1: Call a .vbs script directly from VBA.
  • Scenario 2: Use VBScript as typelib reference (such as VBScript regular expression) in VBA.

You can keep using the existing solutions if your VBA solutions have the scenarios above, as Phase 1 won't affect you. But future phases will affect you, so watch out for new developments.

If you see a runtime error or compile error while executing the VBA projects, check that the VBScript FODs aren’t disabled by admin setting.

Next steps if my app or website has dependency on VBScript

Consider two modern solutions to replace VBscript: PowerShell and JavaScript.

Migrate to PowerShell

We recommend migrating to PowerShell if you:

  • Have websites or applications dependent on VBScript for automating tasks.
  • Use VBScript custom actions as a feature in installer packages. During setup process, these custom actions can use the installation session and perform complex tasks. These custom actions may stop working after deprecation.

In these cases, we recommend you migrate to PowerShell. Learn how to do that at Converting VBScript to Windows PowerShell.

Migrate to JavaScript

As VBScript functionality is currently limited to browsers predating Internet Explorer 11, we recommend migrating your webpages to JavaScript before phase 2. JavaScript offers cross-browser compatibility, working seamlessly across modern browsers such as Microsoft Edge, Mozilla Firefox, Google Chrome, and Apple Safari. Notably, these browsers have never implemented support for VBScript.

If your webpage functions properly across these modern browsers, then VBScript isn’t involved, and its deprecation won’t affect you.

Start planning your migration and stay in touch!

We’re here to help you with the latest updates around VBScript deprecation and to provide additional support as you migrate your dependencies during phases 1, 2, and 3.

Are there any special considerations or scenarios that you’d like to talk about? Please leave us a comment below.

In the meantime, check out additional resources related to VBScript functionality and deprecation:


Continue the conversation. Find best practices. Bookmark the Windows Tech Community, then follow us @MSWindowsITPro on X/Twitter. Looking for support? Visit Windows on Microsoft Q&A.

21 Comments
Copper Contributor

This article addresses the desktop experience, but what are the support plans for Windows Server?

Copper Contributor

Same question as Tom_K

Copper Contributor

Hi @Naveen_Shankar 

What will happen with the "Generic Script" type on Failover Clusters. They only support VBS, do you know if there is any plan to support PowerShell?

Copper Contributor

The Converting VBScript to Windows PowerShell link leads to a dead end.

Copper Contributor

And when is Microsoft going to change their own scripts from EVERYwhere? Intune/Autopilot, MDT, GPOs, MSIs,...

Occasional Reader

What implications does this have for Microsoft deployment took kit since it uses VBscript?

Copper Contributor

@Naveen_Shankar wrote:

It's often embedded within HTML pages to add dynamic interactivity and functionality to web pages...


IIRC, that only ever worked in Internet Explorer.

 

Given the limited availability, I don't think it was "often" used in web pages even back in the 90s. I'd be shocked if anyone was still using it in a web page today!

Copper Contributor

Hello everyone,
I use the LIB scrrun.dll in my VBA project.
In order to parse JSON files I need the dictionary object of scrrun.dll
Will this lib remain or will it also be removed? If so, then what would be the alternative?

Silver Contributor

What is the story on Server-side scripted web pages using VBScript?

Occasional Reader

I also want to know if there is any impact on classic ASP

Copper Contributor

What is happening to the various COM objects exposed for VBScript? These see heavy use in PowerShell. (For example, WScript.Shell, Scripting.FileSystemObect, CertificateAuthority.View.1, NameTranslate, etc.)

 

Is anything being done to improve the deplorable condition of interfacing PS to COM? I'm thinking of such common abominations as:

$property = [System.__ComObject].invokemember("item", $binding::GetProperty, $null, $BuiltinProperties, $DocProperty)

and

$obj.GetType().InvokeMember( 'DomainShortName', 'GetProperty',  $null, $obj, $null )
?
Occasional Reader
Copper Contributor

How will this affect HTA (mshta.exe) applications written with VBScript? I guess they will be unaffected by phase 1 but will need the FOD in phase 2?

Copper Contributor

Phase 3

VBScript will be retired and eliminated from future versions of Windows. This means all the dynamic link libraries (.dll files) of VBScript will be removed. As a result, projects that rely on VBScript will stop functioning. By then, we expect that you’ll have switched to suggested alternatives.


Please explicitly state which .dll files will be removed.  When you say "all the dynamic link libraries of VBScript", which .dll's does Microsoft consider to be a part of VBScript?  It seems safe to assume vbscript.dll will be going away, but what about scrrun.dll?  That would be hugely disruptive in the VBA world as it would mean the loss of both the Dictionary object and the FileSystemObject.  Relatedly, um, there are currently NO "suggested alternatives" for the functionality these .dll's provide.

  • vbscript.dll:
    • Microsoft VBScript Regular Expressions 1.0
    • Microsoft VBScript Regular Expressions 5.5
  • scrrun.dll:
    • Microsoft Scripting Runtime

Also, when you say to VBA developers, "future phases will affect you, so watch out for new developments," when should we expect to see those "new developments"?  Depending on the path forward, we will need some lead time to change the hundreds of thousands (millions?) of code bases that currently rely on those features.

Microsoft

@Tom_K@AlanDoran - VBScript will be available as FODs enabled by default in the upcoming Windows server 2025 version. Around 2027, VBScript FODs will be disabled by default across both the new desktop & server Windows OS versions

Microsoft

@AndAufVCG@BosPete - Microsoft’s first-party applications are expected to migrate/remove/change their script dependencies from VBScript before deprecation phase 2 in the above timeline snapshot.

Microsoft

@empi_ml@nolongerset - The scope of VBScript deprecation includes only vbscript.dll and no other libraries. This shall not impact any projects that are not dependent on vbscript.dll.

 

The VBA team is committed to provide more updates around the alternatives/new developments soon. Stay tuned for further information

 

Microsoft

@Rafael Rivera - Oops, sorry for the inconvenience. We will fix the link. However, the detailed guidance to convert VBScript to PowerShell is available & accessible in the webpage

Copper Contributor

@Naveen_ShankarThank you very much for the clarification.  Knowing that only vbscript.dll is affected is welcome news indeed.  I wish that had been clearer in the article itself, but with your clarification, I feel much more comfortable with the upcoming VBScript deprecation from the VBA perspective.

Occasional Reader

ExcelScript is not powerful enough to replace VBA script for me, as it doesn't allow cell character level manipulation/text formatting. It's a shame, because I'd much rather be coding in TypeScript than in VBA.

Iron Contributor

@AllHailTheHypnotoad https://github.com/dfinke/ImportExcel is strongly recommended as a PowerShell solution.