Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.bat file to open executable within Console2

I am aiming to create a .bat launcher that will execute a command line .exe program within Console2.
My best guess would be that it should go something like:

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

but all that does it open Console2.
Please note that all .bat, and executables are all in the same folder.

like image 210
Switchkick Avatar asked Jun 14 '12 01:06

Switchkick


People also ask

How do I run an EXE from a batch file?

Create Batch File to Run EXE Save your file with the file extension . bat , e.g. run-exe-program. bat and double click on it to run the .exe program.

How do you open a file using a bat file?

Using a BAT file in Windows is as simple as double-clicking or double-tapping it. You don't need to download any special program or tool.


1 Answers

Ok I looked in source for the Console.exe and drilled down into the compiled help.

You need a -r

So: 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. 
like image 177
Preet Sangha Avatar answered Sep 20 '22 01:09

Preet Sangha