0

I have a .exe file in my application that is converted from .py file through pyinstaller. When I run that .exe file, there shows a cmd window. And what I want is to close that window. Can everyone give me a solutions? Thanh you.

leminhnguyen
  • 1,518
  • 2
  • 13
  • 19
  • Use the [`--windowed` option](https://pyinstaller.readthedocs.io/en/v3.3.1/usage.html#windows-and-mac-os-x-specific-options) to not provide a command-line prompt. – Maxime Launois Apr 13 '19 at 14:02
  • @MaximeLaunois Thank you for your answer, actually I use the following command: – leminhnguyen Apr 13 '19 at 14:53
  • @MaximeLaunois : pyinstaller --onefile --noupx --windowed --add-binary "chromedriver.exe;." --icon=ac_solution.ico bot.py, I tried your solution and the console of "bot.exe" file has been closed, but there is still a console of "chromedriver.exe" file. Can you help me close that console? Thank you very much – leminhnguyen Apr 13 '19 at 14:57
  • Maybe this answer will help you to get rid of the `chromedriver.exe` console: [Getting rid of chromedirver console window with pyinstaller](https://stackoverflow.com/a/52644136/10875622) – Maxime Launois Apr 13 '19 at 16:05
  • @MaximeLaunois Great, thank you very much – leminhnguyen Apr 13 '19 at 16:35

0 Answers0