Author Topic: Remain command window after execution  (Read 6619 times)

Teo

  • Contributor
  • Junior Member
  • *****
  • Posts: 16
    • View Profile
Remain command window after execution
« on: December 08, 2015, 12:36:25 »
Hi,

Is it possible to remain command output windows after command execution, i.e. making “cmd /k” as a default?

For example:
-   If I type in command: “java -version”, it will be executed in cmd window and window will be closed
-   To have cmd window remains I now need to type: “cmd /k java –version”

What I am trying to achieve is to avoid typing “cmd /k” every time I need to leave command window after execution (and it is most of the time).

Thanks
« Last Edit: December 08, 2015, 13:49:14 by Teo »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Remain command window after execution
« Reply #1 on: December 08, 2015, 22:49:56 »
You mean if you type a command in the command line field ?

Well no.. If MC does not recognize the command it is sent to windows and windows will launch it.
The command is not sent to cmd.exe or wrapped in a bat script

You can however create alias.. so instead of typing "cmd /k java -version" you can create an alias that translate "r" to "cmd /k" so you then only need to type
"r java -version" and the "r" command will be translated to "cmd /k" before sent to windows.
(Menu > Configuartion > Manage Aliases )


Teo

  • Contributor
  • Junior Member
  • *****
  • Posts: 16
    • View Profile
Re: Remain command window after execution
« Reply #2 on: December 09, 2015, 11:49:31 »
Alias works well for me. Thanks for advice.