How do I add “edit” or “open with” to the context menu for .bat files in Windows Explorer in Windows 7?

I’ve tried this by mucking around with “Set Associations”, but all I’ve accomplished there is messing up the default Open action. I’ve also found a bunch of registry scripts attached to random forum threads, but I’m too nervous to run them.

Answer

You can get ‘Open With’ in the context menu for any file by simply holding the Shift key as you right click.

If Shift + right click doesn’t work, Shift + F10 may work.

To get ‘Edit’ in the context menu you need to edit the registry. Open up regedit and browse to HKEY_CLASSES_ROOT\bat\shell. Create a new key called Edit, then create a new key under that called command. Edit the default value of the command key to be "c:\windows\notepad.exe" "%1".

Attribution
Source : Link , Question Author : Matthew Simoneau , Answer Author : imoatama

Leave a Comment