如何获得cmd中所有Windows识别的可执行扩展的列表? [英] How can I get a list of all windows recognized executable extensions in cmd?
问题描述
我想获取Windows计算机将识别为可执行文件的所有文件扩展名的列表。
I want to get a list of all the file extensions that a windows machine will recognize as an executable.
我在命令提示符下尝试了以下操作:
I tried the following in command prompt:
echo %PATHEXT%
但是我从中得到的只是:
But all I got from that is:
.COM;.EXE;.BAT;.VBS;.VBE;.JS;.WSF;.WSH;.MSC
这不是完整列表。它缺少以下内容:
Which is not a complete list. It's missing things like:
.SCR;.REG;.VB;.VBSCRIPT
,依此类推。
推荐答案
如果扩展名不在%PATHEXT%
中,没有关联。如果仅在命令行中输入 the.vbs
,则会收到相同的提示。
If the extension is not in %PATHEXT%
, then there is no association. If you just type the.vbs
at the command line, you will be informed of same.
如果键入 cscript the.vbs
,然后脚本将运行;假设cscript.exe位于 PATH
变量中。
If you type cscript the.vbs
, then the script will run; assuming cscript.exe is somewhere in the PATH
variable.
简而言之,诸如.SCR; .REG之类的文件; .VB; .VBSCRIPT实际上不是可执行的。 关联
用于了解哪个可执行文件可以运行它们。
In short, files such as .SCR;.REG;.VB;.VBSCRIPT are not actually executable. It is the association
that is used to know which executable can run them.
这篇关于如何获得cmd中所有Windows识别的可执行扩展的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!