# Run Python Script with Powershell by default instead of Cmd (Windows 10)

I'm on Windows 10 using Python 3.6, and I notice that whenever I double click on a Python file (for example, from File Explorer): It runs inside a command prompt window! I would prefer if it were to open up inside a PowerShell window instead. I stumbled across this answer here: Run Python scripts in PowerShell directly But it seems that the .py extension is already added to that environment variable in my case and it still opens up in cmd. So I'm not sure what to do.

Is there any way to change this?

No. Windows Command Prompt (cmd.exe) is not launched. Because the Python interpreter is a command-line program, Windows Console Host (conhost.exe) is launched and provides a terminal interface to the Python interpreter.
@echo off

Then edit the registry to run py scripts with mywrapper.bat %1