Monday, August 30, 2004

JSI Tip 1706. Why do I have to type filename.bat, filename doesn't work?

JSI Tip 1706. Why do I have to type filename.bat, filename doesn't work?: "Why do I have to type filename.bat, filename doesn't work?




Chances are that the PATHEXT environment variable is damaged.



Use Control Panel / System / Environment and select PATHEXT in the System Variables box. This will place PATHEXT in the Variable text box and it's contents in the Value text box. Edit it. The default settings are:



.COM;.EXE;.BAT;.CMD.



If you installed the Windows Scripting Host:



.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS;.WSH;.WSF



You can find this in the registry at:



HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PATHEXT



PATHEXT is a type REG_SZ (string) variable name. "


Uiteraard ook goed te gebruiken voor "set pathext=%pathext%;.py;.pyw" :))