I don't think we want to check extensions this way. We should simply hand off all command lines we cannot execute another way to the command interpreter (which could be made configurable so you can use native cmd.exe if you have it).
Isnt this what Windows uses the COMSPEC env var for? Surely we should (by default) set the COMSPEC env var to wcmd, and if someone wants to change it to the real cmd.exe then they can.
If I remember rightly, a simple C pgm which issues system("fred.bat") fails, (cant remember what happens if you system a .exe though).
This would then leave a change to the CreateProcess and varients to recognize bat pgms to launch the program defined in comspec by.
Interestingly windows2000 seems to honour comspec, and .bat extensions are registered as 'batfile' (in registry) which in turn has a default handler of %1 %* which means internally it must recognize .bat extensions itself.
Jason