1

I'm starting a new commandline tool from a script that requires user input. To minimize user errors and have a cleaner interface I don't want the new terminal to open in a tab, preferably just in old school cmd.

Is there:

A. A way of forcing (one time only, not system wide) a tool to open in cmd when Windows Terminal is set as default?

B. A way to force Windows Terminal (one time only, not system wide) to not show tabs?

3
  • 1
    Also, once Windows Terminal is set has the default, there is no way to handle execution of .cmd scripts for just one file, because once Windows Terminal is set as the default, launching cmd will also open Windows Terminal. You can configure Windows Terminal to always create a new instance instead of a tab when running scripts, which is probably the best you can do. A user can still create a new tab if they want. This is true for both Windows 10 and 11.
    – LPChip
    Commented Jul 8 at 7:38
  • 1
    You can disable tabs within Windows Terminal within Appearance -> Settings -> Always show tabs This would effect all users. It's the only option that exists.
    – Ramhound
    Commented Jul 8 at 11:21
  • Command Prompt can be loaded via cmd, same as PowerShell can be loaded via powershell or pwsh. cmd commands can be executed in PowerShell via cmd /c <command> and PowerShell commands in Command Prompt via <powershell | pwsh> <command>. If needing to load a specific environment within Command Prompt: cmd /k <EnvironmentScript> (cmd and cmd /k opens a new Command Prompt instance)
    – JW0914
    Commented Jul 8 at 13:07

2 Answers 2

1

A. You could always just launch conhost directly. conhost.exe cmd.exe /c <your script> (or similar for powershell) will spawn the vintage console directly, instead of the user's configured default terminal.

B. Nope. That's not something that's possible today, nor do I believe it's something on the issue tracker currently.

As an addenda: wt -w new <commandline> will start a new terminal window regardless of the user's configured windowingBehavior

1
0

I gave zadjii the points since using conhost.exe is the correct answer. But I ended up using ConEmu which has a lot more features for automating a terminal window https://conemu.github.io/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .