Run a executable by python at background and still running
Question: High! I have a executable made by py2exe whitch test if my vpn is connect or
not at infinit loop runinngi on Windows. I want to make run in background or
hiden, i searched for several forums and i found 2 scripts worked partialy.

  1. rename script to "scrypt.pyw" and run py2exe again, the .exe hide when i run it, but close or vanish. Doesnt continues running after the click.

  2. I am made another exe to call the fist one: 

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.

  3. 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.


Answer: I found a solution in this thread [How to start daemon process from python on
windows?](http://stackoverflow.com/questions/12843903/how-to-start-daemon-
process-from-python-on-windows). Thank you all people helped with this thread,
help my script too.

