From 4493a7b10fe639af2a21d0d0da3497bc98f33d0b Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Tue, 18 Feb 2020 14:59:55 +0000 Subject: [PATCH] Daemon: hide Windows console --- mmgen/daemon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mmgen/daemon.py b/mmgen/daemon.py index 60b23984..2355fcc1 100755 --- a/mmgen/daemon.py +++ b/mmgen/daemon.py @@ -46,8 +46,9 @@ class Daemon(MMGenObject): Msg_r(' \b') # blocks w/o this...crazy def exec_cmd_win_console(self,cmd,check): - from subprocess import Popen,CREATE_NEW_CONSOLE - p = Popen(cmd,creationflags=CREATE_NEW_CONSOLE) + from subprocess import Popen,CREATE_NEW_CONSOLE,STARTUPINFO,STARTF_USESHOWWINDOW,SW_HIDE + si = STARTUPINFO(dwFlags=STARTF_USESHOWWINDOW,wShowWindow=SW_HIDE) + p = Popen(cmd,creationflags=CREATE_NEW_CONSOLE,startupinfo=si) p.wait() def exec_cmd(self,cmd,check):