0

I want to create a very simple .exe which runs another .exe that exist on a shared server. The reason for this is so I can update the .exe on the server without having the users having to update their app. I hope that makes sense..

Anyway, I can't seem to figure out how to get rid of the console that pops up. The script that calls the program on the server is just:

import os
os.system('U:/.../Program.exe')

And I create both .exe by running:

pyinstaller -w -F -i image.ico name.py 

(-w should remove console)

I've also tried:

pyinstaller -w -F -i image.ico --noconsole name.py

without success.

Any help is greatly appreciated!

Fred_Alb
  • 174
  • 11

1 Answers1

2

Have you tried placing the --noconsole argument to the right of the target?

So it'd read pyinstaller -w -F -i image.ico name.py --noconsole?

Collin
  • 56
  • 2
  • 1
    After some reading, it looks like the output is being generated by the process you're starting using your python script, the `program.exe` in your example, rather than the initial script. --noconsole only hides the console for the frozen script, not for all processes stemming from it. See this issue: https://stackoverflow.com/questions/7006238/how-do-i-hide-the-console-when-i-use-os-system-or-subprocess-call – Collin Mar 21 '19 at 18:04
  • Sorry for the late reply. Thank you so much Collin for taking the time and finding that thread! It worked! I'm very grateful – Fred_Alb Mar 25 '19 at 06:18