diff options
author | Dee Jayh <ruined1@gmail.com> | 2018-01-23 23:24:48 +0300 |
---|---|---|
committer | Dee Jayh <ruined1@gmail.com> | 2018-01-23 23:25:31 +0300 |
commit | 4f9547ba23c6ee520afeb983065b83a4d72e075e (patch) | |
tree | 3179a63b61a44dc177578496109925a718a131e5 | |
parent | 01264d8fa047f3771d7c8512b8a9118e7da94389 (diff) |
-Fixed small parsing errors
-Eliminated ghost process on auto-escalate
-No version increment
-rw-r--r-- | dwt.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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(): |