On Wed, 28 Mar 2007 04:14:02 -0700, Juan Herrero
I wished to amend a .BAT file, so opened it with OPEN WITH and selected my
editor (NoteTabPro).
Did you clear the "[x] Always open with..." checkbox?
Now when I double click on BAT files it opens the file
in the editor instead of running the BAT file. I tried changing the OPEN WITH
to cmd.exe, but that just opens the DOS window.
..BAT isn't "opened" with CMD.EXE, even though that may be the
interpreter for it, and extra syntax is needed to pass a batch file to
Cmd.exe so that Cmd.exe will invoke it. Cmd.exe %1 won't do it.
Instead, the default is to open .BAT as itself, i.e. the "open" action
is simply %1 (the file itself), just as if it were an .EXE
You can re-assert this via Regedit, or this .REG should do it...
<paste>
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.bat]
@="batfile"
[HKEY_CLASSES_ROOT\batfile]
@="MS-DOS Batch File"
"EditFlags"=hex:30,04,00,00
[HKEY_CLASSES_ROOT\batfile\shell]
[HKEY_CLASSES_ROOT\batfile\shell\edit]
[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
00
[HKEY_CLASSES_ROOT\batfile\shell\YourEdit]
[HKEY_CLASSES_ROOT\batfile\shell\YourEdit\command]
@="\"C:\\Path\\To\\Your\\Editor\\YourEdit.exe\" \"%1\""
[HKEY_CLASSES_ROOT\batfile\shell\open]
"EditFlags"=hex:00,00,00,00
[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"%1\" %*"
</paste>
You can edit the "YourEdit" section to taste, to integrate your editor
as a non-defaul rt-click action.
Similarly, if I right-click an HTML file and choose "edit", it opens MS WORD
I know, and it's AWFUL when Word:
- makes it a "special" Word HTML file
- bloats it up several times in size
- drops stuff that triggers risk-management heuristics
Word is unfit for use as an HTML editor, because it just doesn't "get"
the idea behind HTML; great portability across platforms, and flexible
appearance. Instead, the Word team try to do DTP with it.
but I want to use my own editor (NoteTabPro) - how can I change this
setting (again, file associations don't take).
For HTML, it can be trickier - I know, I want to use Front Page
Express, but it takes a bit of tap-dancing to get it to appear as a
choice within IE's "Programs" list for editing HTML.
I dare not use OPEN WITH !!!!
Yep, Open With (when [x] Always use...) is a stone-age club.
--------------- ---- --- -- - - - -
Saws are too hard to use.
Be easier to use!
--------------- ---- --- -- - - - -