How do I execute .exe files without typing the extension?
July 30, 2001
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:
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
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:
Start the registry editor (regedit.exe).
Go to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerEnvironment.
Double-click PATHEXT.
Modify the entry as required (ensure .EXE is present) and click OK.
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.
About the Author
You May Also Like