I have extended the file context menu in the Windows registry and added a shortcut to a Python script (which is a Tkinter window). It runs fine, but obviously with the Python console in the background. I tried to change the shell command from python
to pythonw
(and renaming the file to .pyw
) but then Windows always simply opens the "open with..." dialog and not the script. If I copy-paste the shell command and run it from cmd, it works. Running the .pyw
from the explorer also works fine, without console.
Why is the behavior different when running it in the shell command?
This is in my .reg
setup file under the command key:
@="pythonw \"C:\\test_script.pyw\" \"%1\""