Updated: May 24, 2024
In October 2023, Microsoft announced that VBScript will be deprecated. In future releases of Windows, VBScript will be available as a Feature On Demand before its removal from the operating system.
VBScript (“Microsoft Visual Basic Scripting Edition”) is a
scripting language developed by Microsoft.
Feature On Demand (FODs) are Windows features that allow you to enable
and disable additional functionality for your devices at any time. On
Windows 11, you can access these features by navigating to Settings ->
Apps -> Optional features.
The reason why Microsoft is deprecating VBScript is because it’s a legacy scripting engine component that Microsoft does not recommend using unless it’s absolutely necessary, as it may contain security vulnerabilities. There are more modern languages available that offer better functionality like JavaScript and PowerShell.
Microsoft shared their VBScript deprecation plan in their blog post. It will happen in three phases.
VBScript is frequently used by organization in-house development teams for automating tasks and creating utility tools, as well as by Windows operating system administrators. While the industry standard for most tasks has shifted away from VBScript to languages like PowerShell and other scripting languages, there are still cases where VBScript remains widely used.
In application management, Microsoft Installer (MSI) capabilities often fall short of making the necessary changes when deploying application packages in an enterprise environment. Therefore, IT system administrators and application packagers utilize VBScript, either for MSI Custom Actions or as a separate file, to implement the required changes during package installation or uninstallation.
When installing MSI without VBScript feature the MSI will fail with the following error:
“The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2738.”
When reading the MSI log file you will find the following error message:
“Error 2738: Could not access VBScript runtime for custom action”
Another scenario where IT system administrators rely on VBScript is when they need to run PowerShell scripts in a user’s context without triggering any pop-ups. Running a PowerShell script in a user’s context can result in opening and closing PowerShell windows, which can be disruptive and annoying for end users. As a solution, enterprise administrators turn to VBScript to launch the PowerShell script.
Please note that at the time this blog post is written, it is still possible to use VBScript as an optional feature in the Windows OS. However, Microsoft’s official announcement of VBScript deprecation due to security reasons is a strong indicator that, in future Windows releases, VBScript may no longer be available. This could potentially disrupt organizations relying on this solution, causing issues and making things to not work as expected.
The exact timing of this change is currently unknown, as well as the specific files and libraries that will be removed from the Windows Operating System with VBScript feature removal. Therefore, it is a good idea to prepare your environment to not rely on deprecated Windows features.
Here are the steps we recommend organizations consider taking to prepare for a transition away from VBScript usage in their environment:
Here is a list of tools and descriptions that can assist you in transitioning away from using VBScript:
Replace VBScript with PowerShell. Explore whether there might be an even better alternative to your current VBScript solution, such as Python.
For System Administrators, you may encounter situations where you need to run PowerShell .ps1 scripts silently without any pop-ups, a feature not currently supported by PowerShell. Ironically, some IT system administrators have used VBScript as a workaround to execute PowerShell scripts, but this is not a viable long-term solution due to the fact VBScript is being deprecated. For further discussion on this topic, you can refer to this thread on X where industry experts discuss different options on how to overcome this issue.
When working with MSI files use Master Packager to open, create, and edit MSI/MST files. Starting with version 23.6.8717 Master Packager will detect if the MSI has VBScript Custom Actions. This functionality is supported in the Free Community Version.
When opening an MSI with Master Packager you will see red warning icon at top indicating that there is an VBScript Custom Action in the MSI/MST file.
Same warning icon is visible in the Custom Action Advanced Editor view.
We believe that a feature like this is a crucial functionality to be proactive and prevent issues going forward. If you use ORCA or InstEd to edit MSI files, then you will love working with Master Packager even more.
With Master Packager Professional you can run a PowerShell script within an MSI or MST file and it takes just a few clicks.
We have made sure that adding and running PowerShell scripts with Master Packager in MSI or MST is easy as possible. Here is how to add PowerShell in an MSI with a 6 simple clicks:
To understand which of your current MSI/MST files has VBScript Custom Actions or .vbs files in the file table you want to check out these VBScript-Remediation script created by awesome Dan Gough). This comes very handy to validate multiple MSI and MST files.
It is available for free under MIT license.
VBScript is a feature that is being deprecated due to security reasons and starting with Windows 11 23H2 is available as Feature On Demand. It is unknown when it will be removed completely therefore it is smart to prepare organizations and the software that use this previously widely used solution and replace it with other tools. It comes in handy to know tools like Master Packager that can help organizations and software developers to understand where VBScript is currently used.