console2

Unable to get -r parameter working


I've tried in every way imaginable to execute a shell command from command line but it simply doesn't work. What am I doing wrong?

C:\Console2\Console.exe -r runstuff.bat

C:\Console2\Console.exe -d C:\Console2 -r runstuff.bat

C:\Console2\Console.exe -r dir

Neither works. (Win7 x64)


Solution

  • I am playing with that now.

    Did you try:

    console2 -r "/K runstuff.bat"
    

    The /K is needed to keep the command open after running the script.

    The problem I'm having with the "-r" option is that I'm having to type exit twice to leave the window.

    If you add the command to shell command (settings... -> Tabs -> Shell) field you will not have to type exit twice:

    %comspec% /K runstuff.bat
    

    I don't think the "%comspec%" is necessary (could use "cmd" instead), but I got it from an example somewhere on the web years ago. Console2's included help file shows using "cmd".