Apps Install or Uninstall VBScript Feature in Windows 11


  • Staff
VBS_banner.png

This tutorial will show you how to install or uninstall the VBScript optional feature for all users in Windows 11.

A .vbs file is a Virtual Basic script written in the VBScript scripting language. It contains code that can be executed within Windows via the Windows-based script host (Wscript.exe), to perform certain admin and processing functions.

VBScript is a legacy Scripting engine component, and Microsoft does not recommend using this component unless it is really required. Use this component at your own risk, this might contain security vulnerabilities.

Starting with Windows 11 build 25309, you can now uninstall the VBScript feature if wanted.

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.



You must be signed in as an administrator to install or uninstall the VBScript optional feature.



Contents

  • Option One: Install or Uninstall VBScript Feature in Settings
  • Option Two: Install or Uninstall VBScript Feature using Command




Option One

Install or Uninstall VBScript Feature in Settings


1 Open Settings (Win+I).

2 Perform one of the available options below: (see screenshots below)
  • Click/tap on Apps on the left side, and click/tap on Optional features on the right side.
  • Click/tap on System on the left side, and click/tap on Optional features on the right side.

VBScript_Settings-1.png
Optional_Features_Settings-1b.png

3 Do step 4 (add) or step 5 (remove) below for what you want.

4 Install VBScript Feature

This is the default setting.


A) Click/tap on the View features button. (see screenshot below)​

VBScript_Settings-3.png

B) Check VBSCRIPT, and click/tap on Next. (see screenshot below)​

VBScript_Settings-4.png

C) Click/tap on Install to confirm. (see screenshot below)​

VBScript_Settings-5.png

D) You can now close Settings if you like.​

5 Uninstall VBScript Feature

A) Under Installed features, click/tap on VBSCRIPT to expand it open. (see screenshot below)​

B) Click/tap on the Uninstall button.​

VBScript_Settings-2.png

C) You can now close Settings if you like.​




Option Two

Install or Uninstall VBScript Feature using Command


1 Open Windows Terminal (Admin), and select Windows PowerShell or Command Prompt.

2 Copy and paste the command below you want to use into Windows Terminal (Admin), and press Enter. (see screenshots below)

Default - Install VBScript Feature
DISM /Online /Add-Capability /CapabilityName:VBSCRIPT~~~~

OR​

Uninstall VBScript Feature
DISM /Online /Remove-Capability /CapabilityName:VBSCRIPT~~~~

3 When prompted to restart the computer, type Y to restart now.

VBScript_command-2.png

VBScript_command-1.png



That's it,
Shawn Brink


 

Attachments

  • VBS.png
    VBS.png
    12.3 KB · Views: 67
Last edited:
Before you remove it, confirm if you're using WScript functions inside any PowerShell scripts. For example, running a PS wrapper to make it windowless, or using SendKeys.
 

My Computer

System One

  • OS
    Windows 7
So I guess Cscript.exe files are out to.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self Built
    CPU
    AMD R7 5700g
    Motherboard
    ASROCK 570 Steel Legend
    Memory
    32Gb
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    Realtek ALC1220 Audio Codec
    Monitor(s) Displays
    1
    Screen Resolution
    1920 x 1080
    Hard Drives
    2 1Tb ssd,, 1 512Gb ssd, 1 256Gb ssd, and 1Tb Hdd
    PSU
    RAIDMAX Thunder RGB RX-735AP-R 735 W
    Case
    Cougar MX331 Mesh
    Cooling
    5 Assorted brands
    Keyboard
    Dell
    Mouse
    Microsoft
    Internet Speed
    FIOS
    Browser
    Chrome
    Antivirus
    MalwareBytes
So I guess Cscript.exe files are out to.
CScript.exe is a console host for running VBScript and JScript scripts. If you uninstall VBScript, you'll still be able to run JScript using CScript.exe or WScript.exe.

Anything you can do with VBScript, you can also do with JScript, so I really see no point in disabling or uninstalling one and not the other.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Fresh install. No option in GUI or using DSIM to install VBSCRIPT

Edition Windows 11 Pro
Version 22H2
Installed on ‎19/‎09/‎2023
OS build 22621.2134
Experience Windows Feature Experience Pack 1000.22659.1000.0
 

My Computer

System One

  • OS
    Windows 11
Fresh install. No option in GUI or using DSIM to install VBSCRIPT

Edition Windows 11 Pro
Version 22H2
Installed on ‎19/‎09/‎2023
OS build 22621.2134
Experience Windows Feature Experience Pack 1000.22659.1000.0
Note that this tutorial is only applicable to the Canary channel build 25309 or higher. It is currently not applicable to any other channel.

Also note that VBScript is installed on all Windows 11 builds.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Note that this tutorial is only applicable to the Canary channel build 25309 or higher. It is currently not applicable to any other channel.

Also note that VBScript is installed on all Windows 11 builds.
Thank you for the clarification. Details provided to get confirmation from someone else as this doesnt appear to be the case in this instance (GA).

EDIT: its .dll appears to be on disk and in the correct place. "C:\Windows\System32\vbscript.dll"
 
Last edited:

My Computer

System One

  • OS
    Windows 11
My use case was windowless screenshots using task scheduler. I had set execution policy as remotesigned in PowerShell 7 which apparently is set differently to 5.1, once i fixed that in 5.1 it all started working again. Ooops.
 

My Computer

System One

  • OS
    Windows 11

Latest Support Threads

Back
Top Bottom