0

I am looking to run a subprocess and not let the subprocess be seen.
I have something like this:

proc = subprocess.call(["some.exe", "arg1", "arg2", "argN"])

The needs to be ran in the background.
I also tried something like this:

info = subprocess.STARTUPINFO()
info.dwFlags = 1
info.wShowWindow = 0
subprocess.Popen('some.exe arg1 arg2 argN', startupinfo=info)

Still no luck, any ideas?

3
Contributors
7
Replies
54
Views
3 Years
Discussion Span
Last Post by Mouche
0

I don't understand what you want to hide. Is it something visible on the screen, like a cmd console, or is some.exe a GUI program ?

Edited by Gribouillis

0

Perhaps by using the start command with options such as /MIN or /B. (Note that I'm only an occasional windows user).

Edited by Gribouillis

0

If you use the win32gui module, you can find the window by its title using win32gui.FindWindow() and then use win32gui.ShowWindow() to minimize it.

win32gui is here on sourceforge

0

I'm not sure. The new program will be out of focus since it is minimized, so the old program shouldn't have lost focus.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.