Home
Windows Registry Tweaks
Index Page
Hardware
Disk Drives
Mice and Keyboards
Modems and Communications
Printers and Plotters
Processor and Motherboard
Video and Graphics
Network
Clients
Internet and Remote Access
Protocols
TCP/IP
WINS
Servers
Security
Active Desktop
Control Panel
Display
Network
Passwords
Printers
System
Desktop and Explorer
Login and Authentication
Network
Privacy
Remote Access
Start Menu and Taskbar
Documents and Folders
System
Software
Internet Explorer
Appearance
Network and Connections
Search Features
Security
Media Player
Microsoft Office
Outlook
Netmeeting
Outlook Express
pcAnywhere
Windows CE
Windows Messenger
Tips and Tricks
Configuration Files
AUTOEXEC.BAT
BOOT.INI
CONFIG.SYS
MSDOS.SYS
SYSTEM.INI
Customization
Keyboard Shortcuts
Windows
Accessories
Command Processor
Dr Watson
Registry Editor
Task Scheduler
Windows Installer
Appearance and Display
Icons and Fonts
Menus And Windows
Desktop
Explorer
File System
Caching and Memory
Files and Shortcuts
Maintenance
Login and Authentication
Start Menu and Taskbar
Documents and Folders
Taskbar
Startup and Shutdown
System
Scripts
Services
Windows File Checker
Troubleshooting
Crash Control
Logging
Repair
Registry FAQ
Dreamage
Book List
Downloads
Support Forums
Newsletter
Download Updates
Subscribe
Registry Guide for Windows Registry Guide for Windows
Part of the Dreamage Network
Dreamage Network and Software
Registry tweaks, tricks & hacks to optimize, enhance and secure Microsoft Windows.

Change the Default Action for Script Files (All Windows)
Category: Home > Windows > System > Scripts

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

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
[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|
-
|HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows Script Host\Settings|
-

Settings:
Name: (Default)
Type: REG_SZ (String Value)
Value: ("Edit" = set Edit as default)

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

 Return to Index Copyright © 1998-2003. All Rights Reserved.  License