FILE FORMAT GUIDE

VBS File: What It Is and How to View It

A VBS file is conventionally a text script for the VBScript engine. Windows Script Host can execute it through WScript or CScript, so opening an untrusted file by association can run code.

Quick facts

Extension
.vbs
Format
VBScript File
Category
system
MIME type
Not reviewed
Standard / developer
Microsoft
Open with
Notepad or Visual Studio Code

What is VBS?

VBScript source can automate operating-system tasks and create COM objects. The extension is not a safe-document label; inspect as text without executing and do not double-click unknown scripts.

How to open VBS

Read unfamiliar VBS files as text. WScript and CScript execute code and are not safe previewers.

Notepad or Visual Studio CodeWindows / macOS / Linux (text inspection)

Open the editor first, then select the .vbs file using File > Open. This reads the source; do not choose Run or launch it through its file association.

Common uses and compatibility

  • Automate Windows tasks through VBScript and Windows Script Host

Things to check

  • Running a script can invoke operating-system and COM capabilities with the current user’s permissions.

Technical details

Signature
Not reviewed
Encoding
Text; encoding depends on the script source
Container
Not reviewed
Compression
Not reviewed

Microsoft Windows Script Host and COM

How to view a VBS file without running it

Reading script text and executing it are different actions. A .vbs association may invoke Windows Script Host.

  1. Open a text editor first, then use its Open dialog to select the script as text.
  2. Review the source without choosing Run, WScript or CScript.
  3. Keep an unfamiliar script unexecuted; changing its extension or reading its contents does not establish that it is safe.

Sources: Microsoft Windows Script Host and COM

VBScript support on modern Windows

Microsoft lists VBScript as deprecated and describes a Feature on Demand stage before eventual removal. Availability depends on the Windows release and installed features; deprecation does not mean every existing Windows installation has already lost its script engine.

Sources: Microsoft deprecated Windows features

VBS vs VBA vs Visual Basic

A shared language family does not make these file types or execution environments interchangeable.

NameTypical environment
VBS / VBScriptText scripts interpreted by a VBScript host
VBAAutomation and extensions inside Office applications
Visual Basic on .NETApplication development for the .NET platform

Sources: Microsoft Windows Script Host and COM · Microsoft VBA in Office · Microsoft Visual Basic on .NET

Is a VBS file a virus?

VBS is a scripting format used for legitimate automation, but a script can perform actions with your user permissions. Its name or icon cannot establish whether the code is safe. Do not run an unexpected attachment or disable security controls to make it open.

Sources: Microsoft Windows Script Host and COM · Microsoft: Windows Script Host (wscript)

VBS vs WSF: can I rename one to the other?

A VBS file contains VBScript source. A WSF file packages script jobs in XML and can select a job through Windows Script Host. Renaming a file does not rewrite its structure or change the code into a harmless document.

Sources: Microsoft: Windows Script Host (wscript) · Microsoft MSDN archive: WSF XML jobs and script packaging

Related formats

  • Windows Script File

    Windows Script File packages script jobs; inspect either format as text before considering execution.

  • Python Source File

    Python is another source-script workflow with a different interpreter and language grammar.

Sources & review

Sources reviewed 2026-11-03.