How to Open wt.exe on a Clear Screen

Copper Contributor

I'm finding this to be quite a simple task, but I just can't seem to find the solution.

 

Upon executing wt.exe with the parameter "-p "Windows PowerShell"" and wt.exe with the parameter "-p "Command Prompt"", I am faced with the following issue:

Is there a method to avoid displaying the "logos" or to include a cls command in the command line itself?

 

Ideally, I am looking for a solution that can be directly implemented via the command line, rather than relying on a configuration-based approach. However, I am open to exploring any available options.

3 Replies

@AndrewBlake 

If you're using PowerShell, you can create a script that runs wt.exe and clears the screen using the Clear-Host cmdlet:


wt.exe -p "Windows PowerShell"
Clear-Host
Save this script as a .ps1 file (e.g., clear_screen.ps1) and run it in PowerShell.

If you're looking for a more general solution that works for both PowerShell and Command Prompt, you can try using the following command:

wt.exe -p "Windows PowerShell" | type nul | cls

This will run the wt.exe command, pipe the output to the type nul command, which discards the output, and then pipe the output to the cls command, which clears the screen.
wt.exe is the Windows Terminal executable, and it's designed to open a new terminal window with the specified settings. The issue you're facing is that the default behavior of wt.exe is to display the logos of the terminal emulators (PowerShell, Command Prompt, etc.) before opening the new terminal window.