How do I execute .exe files without typing the extension?

A. Your computer knows the common extensions via the pathext environment variable. To view the extensions, go to a command prompt and type:

C:\>set pathext

When you type in this environment variable, you'll see a list of extensions that your computer recognizes, similar to the following:


If your list doesn't look like this example, go to the command prompt and type:

set pathext=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

You can also set this variable for all users on your machine by editing the registry:

  1. Start the registry editor (regedit.exe).
  2. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment.
  3. Double-click PATHEXT.
  4. Modify the entry as required (ensure .EXE is present) and click OK.
  5. Close the registry editor.

You can also add new file extensions here so that you can execute those file types without having to type in the file extension.

TAGS: Windows 8
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.