Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
-Fixed unhandled return code in DiagTrack service removal
Browse files Browse the repository at this point in the history
-Fixed DWT to automatically call for elevation instead of bailing out
  • Loading branch information
DeeJayhX committed Jan 23, 2018
1 parent ba75d24 commit 01264d8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -5,6 +5,11 @@ A tool that I created to use some of the known methods of disabling tracking in
<!-- ![screenshot](https://i.imgur.com/qfC2elN.png) -->
![screenshot](http://i.imgur.com/WINUxAj.png)

## CYRILLIC LANGUAGES WARNING
**Slavic languages: Belarusian, Bulgarian, Macedonian, Russian, Rusyn, Serbo-Croatian (for Standard Serbian, Bosnian, and Montenegrin), Ukrainian.**

This program cannot run correctly from a file path that contains Cyrillic characters. Make sure to run it from your root folder (usually C:) so that you don't get runtime errors.

## DOWNLOAD

[DOWNLOAD EXE HERE](https://github.com/10se1ucgo/DisableWinTracking/releases/)
Expand Down
11 changes: 1 addition & 10 deletions dwt.py
Expand Up @@ -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():

Expand Down
2 changes: 1 addition & 1 deletion dwt_about.py
Expand Up @@ -26,7 +26,7 @@
import wx.adv
import wx.lib.scrolledpanel as sp

__version__ = "3.2.0"
__version__ = "3.2.1"


def about_dialog(parent):
Expand Down
4 changes: 3 additions & 1 deletion dwt_util.py
Expand Up @@ -105,14 +105,16 @@ def clear_diagtrack():


output = subprocess_handler(cmd)
if output[0] in [0, 1060]:
if output[0] in [0, 1060, 1072]:
if output[0] == 0:
if len(service) > 1:
logger.info("DiagTrack: Successfully deleted service '{0}'".format(service[1]))
else:
logger.info("DiagTrack: Successfully erased tracking log.")
if output[0] == 1060:
logger.info("DiagTrack: {0} service doesn't exist. This is OK, you likely removed it already.".format(service[1]))
if output[0] == 1072:
logger.info("DiagTrack: {0} service marked for deletion. This is OK, make sure you reboot your machine!".format(service[1]))

logger.info("DiagTrack: Completed Part {0}/{1}".format(i, len(cmds)))
else:
Expand Down

0 comments on commit 01264d8

Please sign in to comment.