Q: When I attempt to launch a VBScript by double-clicking it, it opens in a Notepad. Apparently Notepad has set itself up as the default application for handling .VBS files. I cannot find the correct executable to execute this script.

This happens if the default handler for .VBS files is changed. This may have been done by some security suite so that users don’t accidentally run .VBS files by double-clicking on them. To run the script, you may use one of these two Windows Script Host executables.
- CScript.exe (Console-based Scripting Host)
- WScript.exe (Windows-based Scripting Host)
Whether you use WScript or CScript, you still run the scripts in the same manner. The difference is only in the output — WScript generates windowed output, while CScript sends its output to the command window in which it was started. (REF: Running Scripts from Windows)
To run a VBScript file using CScript.exe, use the following command:
To run a VBScript file using WScript.exe, use the following command:
Reset the Default Action for VBScripts
To reset the default action for .VBS file types so that double-clicking executes the file instead of opening it in Notepad, use these steps:
1. Download vbsfix.zip and save to Desktop.
2. Unzip the archive, and store the files in a folder.
3. If you’re using Windows XP, double-click vbsfix_xp.reg to run it.
4. If you’re using Windows Vista, double-click vbsfix_vista.reg to run it.
5. Click Yes when asked for confirmation.
Bookmark this Page!
BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon |
Related Posts
- Add the “Open With Notepad” Context Menu Option for All File Types
- Error “There Is No Script Engine for File Extension” When Running .Vbs Files
- Change the Default Editor for BAT Files in Windows 2000/XP/Vista
- Calendar Gadget in Windows Sidebar Is Blank With Orange Background
- Add .PHP File Type to the New Menu in Windows 2000/XP/Vista
- Fix: The Default Icon for .VBS Files Changed by Virus/Worm
- Add “Open File Location” To the Context Menu for Shortcuts in Windows XP
- The Default View Source Editor Has Changed in Internet Explorer 8
- Adding the Run as Administrator Option for .VBS and .JS Files
- Add “Edit HOSTS File” Option in the Context Menu
If you enjoyed this post, make sure you subscribe to our RSS feed! We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?

› 