Run a python file in terminal instead of the native cmd shell #17246

Closed
opened 2026-01-31 05:36:34 +00:00 by claunia · 1 comment
Owner

Originally created by @0xJonasDev on GitHub (Apr 15, 2022).

I have a few compiled python scripts packaged in a zip file (app.zip) and activated by a .bat file. The .bat file runs the program in the native cmd shell when double-clicked. Is it possible to somehow configure the .bat file to run the script in MS Windows Terminal instead of the native cmd shell? I am not able to set windows terminal as my default shell handler because that setting is only available for WIn 11 users and not 10.

Here's how the .bat file currently runs the program in the native cmd:

@echo off
start "My_App" cmd /k python "app.zip" %*

Can you revise this so that it runs in windows terminal instead of cmd? Thanks in advance.

Originally created by @0xJonasDev on GitHub (Apr 15, 2022). I have a few compiled python scripts packaged in a zip file (app.zip) and activated by a .bat file. The .bat file runs the program in the native cmd shell when double-clicked. Is it possible to somehow configure the .bat file to run the script in MS Windows Terminal instead of the native cmd shell? I am not able to set windows terminal as my default shell handler because that setting is only available for WIn 11 users and not 10. Here's how the .bat file currently runs the program in the native cmd: ``` @echo off start "My_App" cmd /k python "app.zip" %* ``` Can you revise this so that it runs in windows terminal instead of cmd? Thanks in advance.
claunia added the Issue-QuestionNeeds-TriageNeeds-Tag-FixResolution-Answered labels 2026-01-31 05:36:34 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Apr 15, 2022):

You may want to try

@echo off
start wt --title "My_App" -- cmd /k python "app.zip" %*

wt is the "alias` for the Terminal exe. For more reference, see https://docs.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows

@zadjii-msft commented on GitHub (Apr 15, 2022): You may want to try ```cmd @echo off start wt --title "My_App" -- cmd /k python "app.zip" %* ``` `wt` is the "alias` for the Terminal exe. For more reference, see https://docs.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17246