From 4f9547ba23c6ee520afeb983065b83a4d72e075e Mon Sep 17 00:00:00 2001 From: Dee Jayh Date: Tue, 23 Jan 2018 15:24:48 -0500 Subject: -Fixed small parsing errors -Eliminated ghost process on auto-escalate -No version increment --- dwt.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dwt.py b/dwt.py index 87ab79d..2f46957 100644 --- a/dwt.py +++ b/dwt.py @@ -460,7 +460,12 @@ def exception_hook(error, value, trace): def check_elevated(silent=False): if not bool(windll.advpack.IsNTAdmin(0, None)): - windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__), None, 1) + if silent: + windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), u"{0} -silent".format(unicode(__file__)), None, 1) + sys.exit(1) + else: + windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__) + u" -silent", None, 1) + sys.exit(1) def silent(): -- cgit v1.2.3