Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/10se1ucgo/DisableWinTracking.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDee Jayh <ruined1@gmail.com>2018-01-23 23:24:48 +0300
committerDee Jayh <ruined1@gmail.com>2018-01-23 23:25:31 +0300
commit4f9547ba23c6ee520afeb983065b83a4d72e075e (patch)
tree3179a63b61a44dc177578496109925a718a131e5
parent01264d8fa047f3771d7c8512b8a9118e7da94389 (diff)
-Fixed small parsing errors
-Eliminated ghost process on auto-escalate -No version increment
-rw-r--r--dwt.py7
1 files changed, 6 insertions, 1 deletions
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():