Hello guys!
I would like to ask you something, because i cant understand this. I would like to run an .exe file from a python code, and the code only starts the .exe file HIDDEN (so you only see the .exe in task manager, and no annoying windows in the tray etc.)
Well, that works well with notepad.exe, but when im trying to run another, more serious exe, that wont work.
I think the problem is, when im opening the .exe file, the exe starts a code to force appear itself, after that my code is useless now on. Or i dont know.
Here's my code:
(sorry for my bad english)
I would like to ask you something, because i cant understand this. I would like to run an .exe file from a python code, and the code only starts the .exe file HIDDEN (so you only see the .exe in task manager, and no annoying windows in the tray etc.)
Well, that works well with notepad.exe, but when im trying to run another, more serious exe, that wont work.
I think the problem is, when im opening the .exe file, the exe starts a code to force appear itself, after that my code is useless now on. Or i dont know.
Here's my code:
import os import time import subprocess def open_hidden(): print("start") time.sleep(1) SW_HIDE = 0 info = subprocess.STARTUPINFO() info.dwFlags = subprocess.STARTF_USESHOWWINDOW info.wShowWindow = SW_HIDE subprocess.Popen(r'notepad.exe', startupinfo=info) time.sleep(1) print ("it went done!") open_hidden()so i think i need a code, to force hide an executable AFTER that is already open. Is it possible?
(sorry for my bad english)