如何在 Windows 终端中 运行 一个可执行文件?
How to run an executable in Windows Terminal?
我想 运行 一个带有 Windows Terminal 的可执行文件。像这样:
wt.exe myConsoleApp.exe
但这只会打开终端本身。
将终端设为所有 ps1
、bat
和命令行 exe
文件的默认终端也可以。
当您想要 运行 一个可执行文件时,您应该包含 start
。例如:
start wt.exe
另请注意,如果您当前不在可执行文件的目录中,则应包括完整的文件路径。
更新:现在可以使用:
wt myConsoleApp.exe
如果您使用 Windows 11:
如果 wt.exe
不起作用,请检查是否在“应用程序执行别名”(在“设置”中)下启用了 Windows 终端/wt.exe。
Go to Settings > Apps > Apps & features > App execution aliases. Check that the line containing wt.exe is checked. (click for photo)
我想 运行 一个带有 Windows Terminal 的可执行文件。像这样:
wt.exe myConsoleApp.exe
但这只会打开终端本身。
将终端设为所有 ps1
、bat
和命令行 exe
文件的默认终端也可以。
当您想要 运行 一个可执行文件时,您应该包含 start
。例如:
start wt.exe
另请注意,如果您当前不在可执行文件的目录中,则应包括完整的文件路径。
更新:现在可以使用:
wt myConsoleApp.exe
如果您使用 Windows 11:
如果 wt.exe
不起作用,请检查是否在“应用程序执行别名”(在“设置”中)下启用了 Windows 终端/wt.exe。
Go to Settings > Apps > Apps & features > App execution aliases. Check that the line containing wt.exe is checked. (click for photo)