多重起動防止の処理をロールバック
This commit is contained in:
parent
9cb5f22cfc
commit
19cf8e195c
1 changed files with 10 additions and 7 deletions
|
@ -39,12 +39,16 @@ elif os.path.isfile(client_config_path):
|
||||||
client_config = json.load(r)
|
client_config = json.load(r)
|
||||||
|
|
||||||
def init(**kwargs):
|
def init(**kwargs):
|
||||||
#sp_startupinfo = subprocess.STARTUPINFO()
|
sp_startupinfo = subprocess.STARTUPINFO()
|
||||||
#sp_startupinfo.dwFlags = subprocess.STARTF_USESHOWWINDOW
|
sp_startupinfo.dwFlags = subprocess.STARTF_USESHOWWINDOW
|
||||||
#sp_startupinfo.wShowWindow = subprocess.SW_HIDE
|
sp_startupinfo.wShowWindow = subprocess.SW_HIDE
|
||||||
#task_exist = subprocess.run('tasklist /fi "IMAGENAME eq dislocker_client.exe"', startupinfo=sp_startupinfo, stdout=subprocess.PIPE, text=True)
|
task_exist = subprocess.run('tasklist /fi "IMAGENAME eq dislocker_client.exe"', startupinfo=sp_startupinfo, stdout=subprocess.PIPE, text=True)
|
||||||
#if 'dislocker_client.exe' in task_exist.stdout:
|
if 'dislocker_client.exe' in task_exist.stdout:
|
||||||
#return 1
|
task_count = task_exist.stdout.count("dislocker_client.exe")
|
||||||
|
if task_count == 1:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
return 1
|
||||||
|
|
||||||
if client_config["initial"] == 1:
|
if client_config["initial"] == 1:
|
||||||
master_password = master_password_gen()
|
master_password = master_password_gen()
|
||||||
|
@ -62,7 +66,6 @@ def init(**kwargs):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class App(customtkinter.CTk):
|
class App(customtkinter.CTk):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
Loading…
Reference in a new issue