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:
author10se1ucgo <hammaadu1@gmail.com>2015-08-03 18:29:43 +0300
committer10se1ucgo <hammaadu1@gmail.com>2015-08-03 18:29:43 +0300
commit38005c6ef94fe03c91f9055632bb4a1910d4b465 (patch)
treed641a5a0e9b5898c77764d28ca1948a86e5b48d2
parent29ebf767c209b7469c29cd29ca4a008ff7a37607 (diff)
le meow
-rw-r--r--run.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/run.py b/run.py
index b3664ad..ac20f34 100644
--- a/run.py
+++ b/run.py
@@ -25,7 +25,6 @@ class WinFrame(wx.Frame):
self.warn.Destroy()
sys.exit()
-
self.icon = wx.Icon(r"c:\windows\system32\shell32.dll;315", wx.BITMAP_TYPE_ICO)
self.SetIcon(self.icon)
@@ -62,7 +61,8 @@ class WinFrame(wx.Frame):
_winreg.SetValueEx(self.telekey, "AllowTelemetry", 0, _winreg.REG_SZ, "0") # Disable Telemetry
_winreg.CloseKey(self.telekey)
except WindowsError:
- pass
+ print "Unable to modify Telemetry key. Deleted, or is the program not elevated?"
+
if self.diagbox.IsChecked():
try:
open('C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl',
@@ -71,6 +71,7 @@ class WinFrame(wx.Frame):
"echo y|cacls C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl /d SYSTEM",
shell=True) # Prevent modification to file
except IOError:
+ print "Unable to clear DiagTrack log. Deleted, or is the program not elevated?"
pass
if self.hostbox.IsChecked():
@@ -102,20 +103,19 @@ class WinFrame(wx.Frame):
with open('C:\Windows\System32\drivers\etc\hosts', 'ab') as f:
f.write(self.MSHosts)
except WindowsError:
- pass
+ print "Could not access HOSTS file. Is the program not elevated?"
if self.servicerad.Selection == 0 and self.servicebox.IsChecked():
try:
win32serviceutil.RemoveService('dmwappushsvc') # Delete dmwappushsvc
except pywintypes.error:
print "dmwappushsvc unable to be deleted. Deleted already, or is the program not elevated?"
- pass
try:
win32serviceutil.RemoveService('Diagnostics Tracking Service') # Delete the DiagnosticsTracking Service
except pywintypes.error:
print "Diagnostics Tracking Service unable to be deleted. Deleted already, or is the program not elevated?"
- pass
+
elif self.servicerad.Selection == 1 and self.servicebox.IsChecked():
self.diagkeypath = r'SYSTEM\CurrentControlSet\Services\DiagTrack'
self.dmwakeypath = r'SYSTEM\CurrentControlSet\Services\dmwappushsvc'
@@ -125,28 +125,25 @@ class WinFrame(wx.Frame):
_winreg.SetValueEx(self.diagkey, "Start", 0, _winreg.REG_DWORD, 0x0000004)
_winreg.CloseKey(self.diagkey)
except WindowsError:
- pass
+ print "Unable to modify DiagTrack key. Deleted, or is the program not elevated?"
try:
self.dmwakey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, self.dmwakeypath, 0, _winreg.KEY_ALL_ACCESS)
_winreg.SetValueEx(self.dmwakey, "Start", 0, _winreg.REG_DWORD, 0x0000004)
_winreg.CloseKey(self.dmwakey)
except WindowsError:
- pass
+ print "Unable to modify dwmappushsvc key. Deleted, or is the program not elevated?"
try:
win32serviceutil.StopService('Diagnostics Tracking Service') # Disable Diagnostics Tracking Service
except pywintypes.error:
print "Diagnostics Tracking Service unable to be stopped. Deleted, or is the program not elevated?"
- pass
try:
win32serviceutil.StopService('dmwappushsvc') # Disable dmwappushsvc
except pywintypes.error:
print "dmwappushsvc unable to be stopped. Deleted, or is the program not elevated?"
- pass
- print "Services Disabled"
sys.exit()