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
path: root/dwt.py
diff options
context:
space:
mode:
authorDee Jayh <ruined1@gmail.com>2018-01-23 22:54:44 +0300
committerDee Jayh <ruined1@gmail.com>2018-01-23 22:54:48 +0300
commit01264d8fa047f3771d7c8512b8a9118e7da94389 (patch)
treee287e4ea65e9fe83f9aaa2d7452026fd9372ed8d /dwt.py
parentba75d2489da37e603223de576457e6d60ec29b3a (diff)
-Fixed unhandled return code in DiagTrack service removal
-Fixed DWT to automatically call for elevation instead of bailing out
Diffstat (limited to 'dwt.py')
-rw-r--r--dwt.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/dwt.py b/dwt.py
index 048e23f..87ab79d 100644
--- a/dwt.py
+++ b/dwt.py
@@ -460,16 +460,7 @@ def exception_hook(error, value, trace):
def check_elevated(silent=False):
if not bool(windll.advpack.IsNTAdmin(0, None)):
- if not silent:
- warn = wx.MessageDialog(parent=None,
- message="Program requires elevation, please run it as an administrator.",
- caption="ERROR!", style=wx.OK | wx.ICON_WARNING)
- warn.ShowModal()
- warn.Destroy()
- else:
- logger.info("You didn't run DWT as administrator. Don't bother posting an issue.")
- logger.info("Please re-run as administrator.")
- sys.exit(1)
+ windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__), None, 1)
def silent():