Change the Default Action for Script Files (All Versions)

Normally scripting files are run when double clicked, once applied this tweak will cause them to be shown in Notepad instead. This is useful to avoid accidental execution especially with the prevalence of script based viruses.

Open your registry and for each key below change the value of "(Default)" to equal "Edit". This will change the default action so that the script will be loaded in Notepad.exe (or another specified text editor).

JS Files


JSE Files


VBE Files


VBS Files


WSH Files


WSF Files


In addition you can change the default editor for each script type be changing the "(Default)" value under the [...\Shell\Edit\Command] sub-key.

Restart Windows for the change to take effect.

Note: Scripts can still be executed normally by right-clicking the file and selecting "Open" from the context menu.

Default) REG_SZ Edit

Registry Settings

Value Name: (Default)

Data Type: REG_SZ (String Value)

Value Data: ("Edit" = set Edit as default)