Skip navigation

JSI Tip 1706. 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.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish