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:


If you installed the Windows Scripting Host:


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


  • 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.