Apps Install or Uninstall VBScript Feature in Windows 11


  • Staff
VBS_banner.png

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.

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


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 Click/tap on Apps on the left side, and click/tap on Optional features on the right side. (see screenshot below)


VBScript_Settings-1.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: 12
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
    5700g
    Motherboard
    B550 Gaming X V2
    Memory
    16Gb
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    Realtek
    Monitor(s) Displays
    1
    Screen Resolution
    1920 x 1090
    Hard Drives
    1Tb ssd,, 512Gb ssd, 256Gb, 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
Back
Top Bottom