Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
windows cannot open .bat files though cmd is intact and does open the file but not directly i think this is due to edit in file types in folder options plzz reply really urgent

I don't think it's Explorer's File Types option. My copy doesn't mention BAT extension in there. It's more likely to be the registry settings. Save the following text file as a BAT.REG file and then double-click it:
[Disclaimer: if it goes wrong, it could mess up your whole system.]
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
REGEDIT4[HKEY_CLASSES_ROOT\.bat]
@="batfile"[HKEY_CLASSES_ROOT\.bat\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"[HKEY_CLASSES_ROOT\.bat\ShellNew]
"FileName"="New.bat"[HKEY_CLASSES_ROOT\batfile]
@="MS-DOS Batch File"
"EditFlags"=hex:30,04,00,00[HKEY_CLASSES_ROOT\batfile\DefaultIcon]
@=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73,74,65,6d,33,32,5c,73,\
68,65,6c,6c,33,32,2e,64,6c,6c,2c,2d,31,35,33,00[HKEY_CLASSES_ROOT\batfile\shell]
[HKEY_CLASSES_ROOT\batfile\shell\edit]
[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@=hex(2):22,43,3a,5c,50,72,6f,67,72,61,6d,20,46,69,6c,65,73,5c,45,78,65,63,75,\
74,61,62,6c,65,73,5c,4e,6f,74,65,70,61,64,32,2e,65,78,65,22,20,25,31,00[HKEY_CLASSES_ROOT\batfile\shell\open]
"EditFlags"=hex:00,00,00,00[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"%1\" %*"[HKEY_CLASSES_ROOT\batfile\shell\print]
[HKEY_CLASSES_ROOT\batfile\shell\print\command]
@=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73,74,65,6d,33,32,5c,4e,\
4f,54,45,50,41,44,2e,45,58,45,20,2f,70,20,25,31,00[HKEY_CLASSES_ROOT\batfile\shellex]
[HKEY_CLASSES_ROOT\batfile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers]
[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers\PifProps]
@="{86F19A00-42A0-1069-A2E9-08002B30309D}"[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers\ShimLayer Property Page]
@="{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}"

I've found that one interesting thing about .bat and .cmd in xp's folder options is that they are not officially listed but can be accessed.
Here's how to edit them, goto Control panel>Folder options>File types. Hit the new button type in bat or cmd and hit the advanced button. The associated file type should load up to "MS-Dos batch file" for bat and "Windows NT command script" for cmd, if they are not automatically selected, select them from the drop down list and click on ok. If you don't hit the advanced button you will get an error that the file type is already in use.
You should now have access to edit openers and the like.
Repeat for every time you need to access the options for bat and cmd.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |