How Execute VBS Script

By John Ruiz

A VBS script is a file that contains VBScript or Visual Basic Scripting codes. You can examine the script's contents by opening the file in a text editor such as Windows Notepad or you can execute the script through Windows' built-in Windows Scripting Host. Execute VBS scripts to make a series of changes to your system or perform quick tasks as long as you know exactly what the script does.

Step 1

Run Windows Explorer from the Start menu and locate the VBS script that you wish to execute. Take note of the path where you found the VBS script by looking at the address bar. For example, if you have a VBS file found in the "Scripts" folder in drive C, your path is "C:\Scripts".

Step 2

Execute the VBS script by double-clicking the file only if you are certain that the script will not harm your system. See the warnings section below for tips regarding harmful VBS scripts.

Step 3

Click the Start menu and go to "Run" if the script fails to execute or if a text editor loads instead. Type "cscript" without quotes followed by a space and then insert the path that you took note of in step 1. Press the backslash key on your keyboard and then finish it with the complete file name of the script ending with the ".vbs" extension. Enclose the entire path in quotation marks. For instance, if you have a file called "configure.vbs" located in "C:\scripts," your command in the text box should look like this: cscript "C:\scripts\configure.vbs". Press the "Enter" key to execute the VBS script.

Tips & Warnings

  • If you cannot identify the file as a VBS script, right-click the file and click "Properties." The type of file should indicate that it is a VBScript script file. The default icon also looks like a blue scroll.
  • If you are using Windows Vista or Windows 7, you can type the cscript command in the Start menu search box.
  • If you still cannot run VBS scripts, download and install Windows Script from the resources section below. Make sure you choose the appropriate link that matches your current operating system.
  • Do not run the VBS script if you do not know the script's origins. Some viruses use VBS scripts to propagate. If the script comes from a trusted site, carefully read the description before running the script. If you have some knowledge in Visual Basic, open the VBS script by right-clicking the file and selecting "Edit." Examine the codes and look for any suspicious lines. You can always send the VBS file to a friend or professional if you cannot understand the code.