Search code examples
pythonbatch-filewindowcommand

How to run a batch file without launching a “command window”?


I don't want to open a command window when I am running an application. I directed the shortcut to .bat file while creating .exe file where the application is python based

Code in .bat file is like this

@python\python.exe -m demo.demo %*

where demo is my application name (.bat file name)


Solution

  • Run your script with pythonw.exe instead of python.exe and it won't show dos shell.