I have a executable made by py2exe
which verifies whether my VPN is connected or not at infinite loop running on Windows. I want to make sure it runs in background or hidden, I searched for several forums and I found 2 scripts worked partially.
Rename script to
scrypt.py
and runpy2exe
again, the .exe hide when I run it, but close or vanish. Doesn't continue running after the click.I am made another exe to call the first
import os
import subprocess
os.chdir("C:\Users\dl\Documents\Log\Py")
proc = subprocess.Popen('ipLog.exe', creationflags=subprocess.SW_HIDE, shell=True)
proc.wait()
or
os.chdir("C:\Users\dl\Documents\Log\Py")
proc = subprocess.Popen('ipLog.exe', creationflags=subprocess.SW_HIDE, shell=True)
Works but the first command still visible, and when i close it, the first exe call by it quit too.
- I tried install a module call self.hide but i cant.
I am newbie in python and try to change my hobbies vb, vba to python.
Thanks for any help.