Batch File - Attribute Change

Batch File Attribute Change

To change the Default action of a MS DOS Batch file
Go to:

HKEY_CLASSES_ROOT/batfile/shell

Right click on the Default entry, choose "Modify", and type Edit.
Close Regedit.
You can then preview all batch files before executing them.
Right click and choose "Open" to run a batch file."
NOTE:-
This helps prevent potential "Trojans"/"Bombs" (rogue executables) that use "distructive" internal/external DOS commands, like: FDISK, FORMAT, DELTREE, DEL etc to wipe out entire drives!

Or:-

Go to HKEY_CLASSES_ROOT\batfile\shell\open, now change it to HKCR\batfile\shell\run.
Next change the binary value EditFlags in HKCR\batfile to 00 00 00 00

WARNING: DO NOT INCREASE THE LENGTH OF THE VALUE.

The final step is to go to the explorer and select File Types tab in 'option' Options in View menu and search MS-DOS Batch File then select Edit. Now as you can see, the three last buttons now are enabled and you can select the Edit Action as the default.

To change the Default Action of a file when double clicked, Open Explorer, Select View, Folder Options, File Types, and then the file type you want to edit .
If there are multiple actions the Default is embolden
Scroll down to the file you want to change, Select edit, Highlight the action you want as default and press the Default Tab.