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 Settings\USER\Application Data\Notepad++\

    Vista/Windows 7 Path:
    C:\Users\USER\AppData\Roaming\Notepad++\

    Find <UserDefinedCommands> section and add the following line:
    <Command name="Wscript" Ctrl="yes" Alt="no" Shift="no" Key="13">c:\WINDOWS\system32\wscript.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

Recent Posts

Recent Comments

Meta

Written by:

2 Comments

  1. James
    4/9/2017
    Reply

    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 ?

    • Vlad
      4/10/2017
      Reply

      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.

Leave a Reply

Your email address will not be published. Required fields are marked *