我打算创建一个.bat启动器,用于在Console2中执行命令行.exe程序。
我的最佳猜测是应该像这样进行:
@echo off
start "" Console.exe program.exe
但是这只是打开了Console2。
请注意,所有的.bat和可执行文件都在同一个文件夹中。
我打算创建一个.bat启动器,用于在Console2中执行命令行.exe程序。
我的最佳猜测是应该像这样进行:
@echo off
start "" Console.exe program.exe
但是这只是打开了Console2。
请注意,所有的.bat和可执行文件都在同一个文件夹中。
好的,我查看了Console.exe的源代码,并深入研究了编译好的帮助文档。
你需要一个-r选项
因此,命令如下:Console.exe -r program.exe
Command line parameters
Console supports these command line parameters:
-c <configuration file>
Specifies a configuration file.
-w <main window title>
Sets main window title. This option will override all other main window title settings (e.g. 'use tab titles' setting)
-t <tab name>
Specifies a startup tab. Tab must be defined in Console settings.
-d <directory>
Specifies a startup directory. If you want to parametrize startup dirs, you need to specify startup directory parameter as "%1"\ (backslash is outside of the double quotes)
-r <command>
Specifies a startup shell command.
-ts <sleep time in ms>
Specifies sleep time between starting next tab if multiple -t's are specified.
我之前从未听说过这个程序,但它的源代码
else if (wstring(argv[i]) == wstring(L"-r"))
{
// startup cmd
++i;
if (i == argc) break;
startupCmds.push_back(argv[i]);
}
看起来你可能想尝试:
Console.exe -r program.exe