Again, none of the previous answers did it here.
I for example had to change the default value of [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell]
from edit
to open
.
(Once I had changed the file type extend associations in Explorer folder options dialog. BAT files were & are not offered for change. There seems to be a special exception. But I remember, once I added the BAT type in the Explorer folder options dialog, to get 'edit' being the default shell verb.)
Various places to inspect
So after all there are varying reasons and varying OS version, and (at least) the (default) values of the following registry folders (and subfolders) need to be checked - using some common sense :-). And I think that list may reflect the order of precedence which is relevant to the OS:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat] (if present: remove "UserChoice")
[HKEY_CURRENT_USER\Software\Classes\.bat] (if present: @ = "batfile")
[HKEY_CURRENT_USER\SOFTWARE\Classes\batfile] (if present)
[HKEY_CURRENT_USER\SOFTWARE\Classes\batfile\shell] (if present: @ = "open")
[HKEY_CURRENT_USER\SOFTWARE\Classes\batfile\shell\open\command] (if present: @ = "\"%1\" %*")
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.bat] @ = "batfile"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell] @ = "open"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\open\command] @ = "\"%1\" %*"
[HKEY_CLASSES_ROOT\.bat] @ = "batfile"
[HKEY_CLASSES_ROOT\batfile]
[HKEY_CLASSES_ROOT\batfile\shell] @ = "open"
[HKEY_CLASSES_ROOT\batfile\shell\open\command] @ = "\"%1\" %*"
1FYI, .bat files are not executables. They are interpreted scripts. – Keltari – 2016-01-17T05:55:47.193
1I can't even find .BAT in the file type associations dialog in Windows. And I can't invoke the Open With... dialog on a .bat file. How could he have changed it?? – None – 2009-10-09T01:03:13.373
3umm...i'm guessing that's why he's da boss? ;) – None – 2009-10-09T01:12:08.030
3right click .bat file -> Open with... -> select MS Word, check "Always open with this program", click OK. bam, your extension is now registered to Word. – quack quixote – 2009-10-11T17:21:53.377
My bat files also don't have the "Open With" menu (Windows 7) Other files have it, of course. – lbalazscs – 2013-01-16T18:12:14.850
Possible duplicate of How do you remove a default program association for file types in Windows 7?.
– Peter Mortensen – 2013-09-05T16:03:43.950