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.
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.
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:
Go to Start> Settings> System> Optional features.
Select View features next to “Add an Optional feature” option at the top.
Type “VBSCRIPT” in the search dialog and select the check box next to the result.
To enable the disabled feature, press Next.
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:
Creating Scripts Using Visual Basic
VBScript is no longer supported in IE11 edge mode (Windows)
PowerShell Documentation – PowerShell
About Scripts – PowerShell
Regular Expression (RegExp) Object
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.
>>> Read full article>>>
Copyright for syndicated content belongs to the linked Source : Hacker News – https://techcommunity.microsoft.com/t5/windows-it-pro-blog/vbscript-deprecation-timelines-and-next-steps/ba-p/4148301