Running bat files

Chitchat about x² / 2X products

Moderators: fgagnon, nikos, Site Mods

Post Reply
sbring
Member
Member
Posts: 12
Joined: 2002 May 30, 12:28

Post by sbring »

Funny, I cannot run bat files by double clicking on them any longer. They get opened in Notepad instead. I've also noticed that a timed macro (Macro Express) I've used for a long time does the same, as does using the run command on a bat file. I suppose this must be some Windows setting gone awry. Any ideas what I should try to remedy this?

Sven
User avatar
nikos
Site Admin
Site Admin
Posts: 15808
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

looks like the file association for .bat files has gone amiss
check out the "open" verb for these types using the Folder Options system dialog (or go directly to the registry key HKEY_CLASSES_ROOT\batfile)
sbring
Member
Member
Posts: 12
Joined: 2002 May 30, 12:28

Post by sbring »

Funny thing is, I cannot find bat files at all in the Folder Options settings, although I've lookednot only for the extension, but also for MS-DOS Batch files. I find batfile it in the registry, but don't know what it should say, running Windows 2000.

Sven
User avatar
nikos
Site Admin
Site Admin
Posts: 15808
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

folder options for w2000 is awful! Many interesting things are listed under the "extension" N/A like folders and things, but it seems that executables like BAT files (or EXE) are not listed. That's why I recommended the registry approach

check if this key exists like on my 2000 system:
HKEY_CLASSES_ROOT\batfile\shell\open\command

Its default value should be the string
"%1" %*
sbring
Member
Member
Posts: 12
Joined: 2002 May 30, 12:28

Post by sbring »

Thanks, I'll try that when I get at that computer tomorrow and let you know if it works.

Sven
sbring
Member
Member
Posts: 12
Joined: 2002 May 30, 12:28

Post by sbring »

I'm sorry to say I have the same key, so this didn't solve the problem. Can you think of any source where I could look for more info on how bat files are run in Windows 2000?

Sven
User avatar
nikos
Site Admin
Site Admin
Posts: 15808
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

well, the other thing i can think of is to check your HKCR\.bat key and verify it points to the "batfile" key. Can you remember what you installed and triggered this strange behaviour?

as a last resort try exporting both HKCR\.bat & batfile keys and email them to me so i can have a close look
sbring
Member
Member
Posts: 12
Joined: 2002 May 30, 12:28

Post by sbring »

Well, the .bat key doesn't point to the batfile key. Should it? I'm at home now, but I could send you the keys for scrutiny tomorrow when I'm back at work.

Thanks,
Sven
sbring
Member
Member
Posts: 12
Joined: 2002 May 30, 12:28

Post by sbring »

Here comes the bat and batfile keys from my registry. It seems I can attach only one file at a time, so I send one post for each file. I don't know how to merge them.

Sven

Attachment: http://netez.com/bbphp/uploads/post-14-78788-batreg.reg
sbring
Member
Member
Posts: 12
Joined: 2002 May 30, 12:28

Post by sbring »

User avatar
nikos
Site Admin
Site Admin
Posts: 15808
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

here's your problem

[HKEY_CLASSES_ROOT\.bat]
@="textedext"

looks this "textedext" thing has taken over your batch files. The default value should be batfile instead.

i'm not sure what this is (maybe a playful virus or something you installed) but you can check HKCR\textedext to discover the culprit  :)
sbring
Member
Member
Posts: 12
Joined: 2002 May 30, 12:28

Post by sbring »

It worked!

I suspect an editor I had installed for a while called TextEd.

Thanks a lot for your help! Ive got a lot of less helpful tips from other people those last weeks...

Sven
Post Reply