PC Tools - Essential tools for your PC | United States & Canada
Search
 
 
Features
 
 
Newsletter
 
Registry Home > Windows > System > Scripts

Change the Default Action for Script Files (All Windows)

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.

This tweak can be easily applied using WinGuides Tweak Manager.
Download a free trial now!

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
[HKEY_CLASSES_ROOT\JSFile\Shell]

JSE Files
[HKEY_CLASSES_ROOT\JSEFile\Shell]

VBE Files
[HKEY_CLASSES_ROOT\VBEFile\Shell]

VBS Files
[HKEY_CLASSES_ROOT\VBSFile\Shell]

WSH Files
[HKEY_CLASSES_ROOT\WSHFile\Shell]

WSF Files
[HKEY_CLASSES_ROOT\WSFFile\Shell]

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.

Registry Editor Example
|NameTypeData|
|(Default)REG_SZEdit|
-
||
-
Registry Settings
Value Name: (Default)
Data Type: REG_SZ (String Value)
Value Data: ("Edit" = set Edit as default)

>> Recommended Download - check, repair and optimize your registry now with Registry Mechanic <<

Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.

Last modified: June 18, 2002

 
  Copyright © 1998-2009 PC Tools. All rights reserved. Privacy Policy | Legal Notice