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

Commit

Permalink
New Info>About tab.
Browse files Browse the repository at this point in the history
 Includes License, version number and a link to the GitHub project page.

 Also, selecting "Telemetry" will now automatically select the HOSTS option, as "Telemetry" alone does not completely disable it.
  • Loading branch information
10se1ucgo committed Aug 4, 2015
1 parent 7654b1d commit 26fca74
Showing 1 changed file with 37 additions and 5 deletions.
42 changes: 37 additions & 5 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,34 @@
import ctypes

import wx
from wx.lib.wordwrap import wordwrap
import win32serviceutil
import pywintypes


class WinFrame(wx.Frame):
def __init__(self, parent, title):
super(WinFrame, self).__init__(parent, title=title, size=[375, 215],
super(WinFrame, self).__init__(parent, title=title, size=[375, 235],
style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER ^ wx.MAXIMIZE_BOX)

wxpanel = wx.Panel(self)

menuBar = wx.MenuBar()
fileMenu = wx.Menu()
aboutMenuItem = fileMenu.Append(wx.NewId(), "About",
"About the application")
menuBar.Append(fileMenu, "&Info")
self.SetMenuBar(menuBar)

self.Bind(wx.EVT_MENU, self.about, aboutMenuItem)

self.debug = wx.TextCtrl(wxpanel, wx.ID_ANY, size=(349, 92),
style=wx.TE_MULTILINE | wx.TE_READONLY, pos=(10, 84))

self.redir = RedirectText(self.debug)
sys.stdout = self.redir

if ctypes.windll.shell32.IsUserAnAdmin() != 1:
if ctypes.windll.shell32.IsUserAnAdmin() != 0:
self.warn = wx.MessageDialog(parent=wxpanel,
message="Program requires elevation, please run it as an administrator",
caption="ERROR", style=wx.OK | wx.ICON_WARNING)
Expand All @@ -34,13 +44,15 @@ def __init__(self, parent, title):
self.icon = wx.Icon(r"c:\windows\system32\shell32.dll;315", wx.BITMAP_TYPE_ICO)
self.SetIcon(self.icon)

self.telebox = wx.CheckBox(wxpanel, label="Disable Telemetry", pos=(10, 15))
self.telebox = wx.CheckBox(wxpanel, label="Telemetry", pos=(10, 15))
self.telebox.Bind(wx.EVT_CHECKBOX, self.hostcheck)
self.telebox.Set3StateValue(0)

self.diagbox = wx.CheckBox(wxpanel, label="Clear DiagTrack log", pos=(10, 45))
self.diagbox.Set3StateValue(0)

self.hostbox = wx.CheckBox(wxpanel, label="Block tracking servers with HOSTS file", pos=(10, 60))
self.hostbox = wx.CheckBox(wxpanel, label="Block tracking servers with HOSTS file (Needed for Telemetry)",
pos=(10, 60))
self.hostbox.Set3StateValue(0)

self.servicebox = wx.CheckBox(wxpanel, label="Services", pos=(10, 30))
Expand All @@ -58,6 +70,27 @@ def __init__(self, parent, title):
def serviceradcheck(self, event):
self.servicerad.Enable(self.servicebox.IsChecked()) # If Service box is ticked enable Service radio box

def hostcheck(self, event):
self.hostbox.Set3StateValue(self.telebox.IsChecked())

def about(self, event):
licensetext = "Copyright 2015 10se1ucgo\r\n\r\nLicensed under the Apache License, Version 2.0" \
" (the \"License\");\r\nyou may not use this file except in compliance with the License" \
".\r\nYou may obtain a copy of the License at\r\n\r\n" \
" http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or" \
" agreed to in writing, software\r\ndistributed under the License is distributed on an" \
" \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied." \
"\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License."

aboutpg = wx.AboutDialogInfo()
aboutpg.Name = "Windows 10 Tracking Disable Tool"
aboutpg.Version = "v1.4"
aboutpg.Copyright = "(c) 2015 10se1ucgo"
aboutpg.Description = "A tool to disable nasty tracking in Windows 10"
aboutpg.WebSite = ("https://github.com/10se1ucgo/DisableWinTracking", "GitHub Project Page")
aboutpg.License = wordwrap(licensetext, 500, wx.ClientDC(self))
wx.AboutBox(aboutpg)

def onok(self, event):
if self.telebox.IsChecked():
self.telekeypath = r'SOFTWARE\Policies\Microsoft\Windows\DataCollection' # Path to Telemetry key
Expand Down Expand Up @@ -167,7 +200,6 @@ def __init__(self, aWxTextCtrl):
def write(self, string):
self.out.WriteText(string)


if __name__ == '__main__':
wxwindow = wx.App(False)
WinFrame(None, title='Disable Windows 10 Tracking') # Create Window
Expand Down

0 comments on commit 26fca74

Please sign in to comment.