PDA

View Full Version : Doesn't Recognize Batch Files as Runnable


Microhard
November 24th 04, 08:57 PM
Suddenly a PC doesn't consider a file with a .bat extension as runnable. The
file's icon is the same as a .bak or .txt (not a rectangle with a blue bar
like an .exe or .com). If you double-click it, nothing happens. If you
right-click it, "open" is not an option.

Rock
November 24th 04, 10:39 PM
Microhard wrote:

> Suddenly a PC doesn't consider a file with a .bat extension as runnable. The
> file's icon is the same as a .bak or .txt (not a rectangle with a blue bar
> like an .exe or .com). If you double-click it, nothing happens. If you
> right-click it, "open" is not an option.

Go to Doug Knox's site and run the .bat file association fix:
http://www.dougknox.com/xp/file_assoc.htm

Alex Nichol
November 25th 04, 03:03 PM
Microhard wrote:

>Suddenly a PC doesn't consider a file with a .bat extension as runnable. The
>file's icon is the same as a .bak or .txt (not a rectangle with a blue bar
>like an .exe or .com). If you double-click it, nothing happens. If you
>right-click it, "open" is not an option.

The necessary basic parts of the default settings for .bat can be
restored with this registry patch: Make the following, after - - start
and before - - end into a file by cut/paste to NotePad. If you do not
have Windows in C:\WINDOWS, make the appropriate change in one place.
Make sure there is a blank line at the end. Save as "Patch.reg" then
right-click on this file and take Merge to enter it into the registry.

- - start
REGEDIT4

[HKEY_CLASSES_ROOT\.bat]
@="batfile"

[HKEY_CLASSES_ROOT\.bat\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\batfile]
@="MS-DOS Batch File"
"EditFlags"=hex:30,04,00,00

[HKEY_CLASSES_ROOT\batfile\DefaultIcon]
@="C:\\WINDOWS\\SYSTEM32\\SHELL32.DLL,-153"

[HKEY_CLASSES_ROOT\batfile\shell]

[HKEY_CLASSES_ROOT\batfile\shell\open]
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"%1\" %*"


- - end

--
Alex Nichol MS MVP (Windows Technologies)
Bournemouth, U.K. (remove the D8 bit)

Google