14

Console2内でコマンドライン .exe プログラムを実行する .bat ランチャーを作成することを目指しています。
私の最善の推測は、次のようになるはずです。

@echo off
start "" Console.exe program.exe

しかし、それだけで Console2 が開きます。
すべての .bat と実行可能ファイルはすべて同じフォルダーにあることに注意してください。

4

2 に答える 2

19

わかりました、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. 
于 2012-06-14T01:56:46.353 に答える
10

このプログラムのことは聞いたことがありませんでしたが、そのソース コードは

   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
于 2012-06-14T01:54:22.917 に答える