Run VBScript from Notepad++

  1. Close Notepad++ if it’s open.
  2. Using a different text editor (i.e. regular Notepad) edit shortcuts.xml file located in:
  3. Windows XP Path:
    C:Documents and SettingsUSERApplication DataNotepad++

    Vista/Windows 7 Path:
    C:UsersUSERAppDataRoamingNotepad++

    Find <UserDefinedCommands> section and add the following line:
    <Command name="Wscript" Ctrl="yes" Alt="no" Shift="no" Key="13">c:WINDOWSsystem32wscript.exe "$(FULL_CURRENT_PATH)"</Command>

    This will assign Ctrl+Enter shortcut to execute VBScript. Save and close file.

  4. Open your VBScript file in Notepad++, try Ctrl+Enter to run it
  5. Optionally: in Notepad++ menu go to “Run > Modify shortcut/Delete Command”, there you can easily change a shortcut for the added Wscript command

2 thoughts on “Run VBScript from Notepad++

  1. Find section and add the following line:
    c:\WINDOWS\system32\wscript.exe “$(FULL_CURRENT_PATH)”

    There is no “section” in the shortcuts.xml file. How do i make this work ?

    Like

    1. I didn’t escape <Command> and <UserDefinedCommands> elements and WP just treated it as an HTML code, so my instructions looked unclear. Fixed! Thanks for bringing it up.

      Like

Leave a reply to James Cancel reply

Design a site like this with WordPress.com
Get started