Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Windows, *.exe, *.bat, *.cmd, and *.com all represent programs or shell scripts that can be run, simply by double-clicking them. Are there any other filename extensions that indicate a file is executable?

EDIT: When I jump into a new project (or back into an old project!), one of the common things I want to do when looking around is to find out what tools there are. On Unix (which I've used for decades), there's an execute bit, so this is as simple as:

find . -executable -type f

I figured that on Windows, which seems to have a much more complex mechanism for "is this executable (and how do I execute it)", there would be a relatively small number of file name extensions which would serve roughly the same purpose.

For my current project, *.exe *.bat *.cmd is almost certainly sufficient, but I figured I'd ask if there was an authoritative list.

share|improve this question
up vote 23 down vote accepted

The basic "executable" files (the ones Windows looks to execute via the PATH) are stored in an environmental variable called PATHEXT. You can see this from a command prompt:


On my machine, I get this (WinXP):


This is not an exclusive list. Windows will also execute other files (for instance, screen savers have an extension of .scr and are executables); Windows will also allow execution of other file extensions, but the ones listed above are the default executable extensions.

share|improve this answer
Brilliant find! – barlop Jan 3 '11 at 20:27
additionally, you can add more - for example, add .py to let "pyscript" run ""! – Phoshi Jan 3 '11 at 22:45
@Phoshi but with .py then you're going third party, and there's no end – barlop Jan 4 '11 at 7:57
@barlop; Indeed I am, but it's a useful thing to know, if tangential to the question :) – Phoshi Jan 4 '11 at 9:04
Theres also .SCR for screensavers. They can (and do) contain actual execution code for the screensavers. They're just not in PATHEXT. – sinni800 May 3 '13 at 10:27

A common one for installer programs is .msi.

share|improve this answer
It's really less an executable format and more a script format, since it still needs to be parsed by msiexec.exe. – Hello71 Jan 3 '11 at 22:40
@Hello71: Are you really 12? – paradroid Jan 4 '11 at 1:32
@paradroid: no, he's really not. look at his writing style. – studiohack Jan 4 '11 at 1:39
@paradroid: Does it really matter? – Hello71 Jan 4 '11 at 1:49
@studiohack: That is what I am confused about. @Hello71: Yes, it does, because if you are, you scare me. – paradroid Jan 4 '11 at 2:00

.vbs is a script. and .js

But if you know some history then you'd be able to put things in context better. I suppose if I hadn't used computers for as long as I have, I might also focus on knowing which extensions are executables..'cos they're quite exciting and seem fundamental.. and I suppose they are.. But notice how with time, .COM died out a lot after DOS, just mainly known I suppose after that if at all, in windows 9x in shell. Maybe old NTs used them a lot. Scripts.. vbs came around win9x time perhaps.. so new ones appear. ps1 is even newer than vbs.

.COM is very old.. i'm not sure if windows xp for examples relies on any .COM files. But it has a more for legacy apps I guess.

.BAT is a script..back from DOS days. still in use today. .VBS is more modern but .BAT is still used and won't go out of use any time soon, and people sensibly use both. There's .CMD which I haven't used but probably not so different to anything. There's ps1 (powershell. this is more modern than vbscript) If we're talking scripts in a loose sense, there are .REG

Really the term executable only applies to EXE and .COM(.COM being basically extinct.. more a win9x thing (the command prompt in win9x was , there was no cmd.exe) , and COM files are a DOS thing. But not NT's CMD for example NT's command shell is cmd.exe though as mentioned there is a in NT I guess for legacy apps but NT most probably doesn't rely on it)

.MSC e.g. They are not executables..I suppose they are a kind of script.. services.msc seems to be written in xml) But if going that loose then one might go a step further to non system things, and say HTML pages are one 'cos they are interpreted.. like a script. But not by the OS though.. .CPL are not scripts.. look at them in notepad. People tend not to think of them as executables or scripts, maybe 'cos only MS developers write them. (or if others do then that's very uncommon!)

share|improve this answer
Unfortunately, adding .MSC to the PATHEXT does not let you run MMC snap-ins without adding the extension (eg services instead of services.msc). :-( – Synetech Feb 24 '12 at 6:34
@Synetech because there is already a services.exe. – kinokijuf Aug 26 '13 at 16:13
@kinokijuf, true; if you run diskmgmt (without the extension) from a command-prompt it will work, but running services won’t. However none of them will work if you try to run them from the Run dialog without the .msc extension, even though the system-wide pathext variable contains .msc. – Synetech Aug 26 '13 at 16:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .