diff options
author | Alexey Galkin <leks.molecul@gmail.com> | 2019-01-05 06:53:22 +0300 |
---|---|---|
committer | Alexey Galkin <leks.molecul@gmail.com> | 2019-01-05 06:53:22 +0300 |
commit | caba0c3c8f010b9db978985878b7f8985dfcccb9 (patch) | |
tree | f12a235f48a39280b876e61d10b195b023a790e7 | |
parent | 6c5f17b00cf5545ef37e4b8905a829682237f854 (diff) |
Implement –turn off Xbox DVR via registry
-rw-r--r-- | README.md | 9 | ||||
-rw-r--r-- | dwt.py | 23 | ||||
-rw-r--r-- | dwt_util.py | 18 |
3 files changed, 42 insertions, 8 deletions
@@ -91,6 +91,15 @@ Runs `C:\Windows\SysWOW64\OneDriveSetup.exe /uninstall` (64 bit) or Also disables registry entries that keep the OneDrive Icon pinned to your Windows Explorer list: ![OneDrive Example Image](http://i.imgur.com/26yfnGD.png) +#### Xbox DVR + +Action: +* Disable: Set the `GameDVR_Enabled` registry key for both services to `0` (Disabled) Located at `HKEY_CURRENT_USER\System\GameConfigStore` +* Disable: Set the `AllowGameDVR` registry key for both services to `0` (Disabled) Located at `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR` + +This action requires reboot computer for completely applying. + + ## Delete Services vs Disable Services? Selecting "Disable" will simply stop the services from being able to run. @@ -149,6 +149,10 @@ class MainPanel(wx.Panel): self.onedrive_check = wx.CheckBox(self, label="Uninstall OneDrive") self.onedrive_check.SetToolTip("Uninstalls OneDrive from your computer and removes it from Explorer.") + # Xbox DVR checkbox + self.dvr_check = wx.CheckBox(self, label="Disable Xbox DVR") + self.dvr_check.SetToolTip("Disable Xbox DVR feature to increase FPS in games") + self.service_rad = wx.RadioBox(self, label="Service Method", choices=("Disable", "Delete")) self.service_rad.SetItemToolTip(item=0, text="Simply disables the services. This can be undone.") self.service_rad.SetItemToolTip(item=1, text="Deletes the services completely. This can't be undone.") @@ -245,6 +249,7 @@ class MainPanel(wx.Panel): check_sizer.Add(self.defender_check, 0, wx.ALL, 1) check_sizer.Add(self.wifisense_check, 0, wx.ALL, 1) check_sizer.Add(self.onedrive_check, 0, wx.ALL, 1) + check_sizer.Add(self.dvr_check, 0, wx.ALL, 1) # self.Bind(wx.EVT_CHECKBOX, handler=self.select_all_apps, source=select_all_check) self.Bind(wx.EVT_CHECKBOX, handler=self.ip_warn, source=self.ip_check) @@ -259,7 +264,7 @@ class MainPanel(wx.Panel): for child in self.app_box.GetStaticBox().GetChildren(): if isinstance(child, wx.CheckBox): child.SetValue(event.IsChecked()) - + def ip_warn(self, event): # Warn users about the potential side effects of the IP blocking firewall rules if event.IsChecked(): @@ -317,6 +322,8 @@ class MainPanel(wx.Panel): dwt_util.wifisense(undo=undo) if self.onedrive_check.IsChecked(): dwt_util.onedrive(undo=undo) + if self.dvr_check.IsChecked(): + dwt_util.dvr(undo=undo) logger.info("Done. It's recommended that you reboot as soon as possible for the full effect.") logger.info( "If you feel something didn't work properly, please press the " @@ -333,7 +340,7 @@ class MainPanel(wx.Panel): if not silent_flag: dialog = wx.Dialog(parent=self, title="Settings", style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) sizer = wx.BoxSizer(wx.VERTICAL) - + normal_domains = ( 'a-0001.a-msedge.net', 'a-0002.a-msedge.net', 'a-0003.a-msedge.net', 'a-0004.a-msedge.net', 'a-0005.a-msedge.net', 'a-0006.a-msedge.net', 'a-0007.a-msedge.net', 'a-0008.a-msedge.net', @@ -419,12 +426,12 @@ class MainPanel(wx.Panel): dialog.Center() dialog.ShowModal() dialog.Destroy() - + self.picked_normal = normal_domain_picker.GetSelections() self.picked_extra = extra_domain_picker.GetSelections() self.picked_ips = ip_picker.GetSelections() - - + + def setup_logging(): global logger logger = logging.getLogger('dwt') @@ -481,7 +488,7 @@ def check_elevated(silent_flag=False): windll.shell32.ShellExecuteW( None, u"runas", unicode(sys.executable), unicode(__file__), None, 1) sys.exit(1) - + def silent(): @@ -496,7 +503,7 @@ def silent(): # dwt_util.defender(0) dwt_util.wifisense(0) dwt_util.onedrive(0) - + logger.info("COMPLETE") @@ -504,7 +511,7 @@ if __name__ == '__main__': if '-silent' in sys.argv: silent() sys.exit(0) - + wx_app = wx.App() frame = MainFrame() console = ConsoleDialog(sys.stdout) diff --git a/dwt_util.py b/dwt_util.py index 6836cec..29d637a 100644 --- a/dwt_util.py +++ b/dwt_util.py @@ -358,3 +358,21 @@ def subprocess_handler(cmd): # subprocess.call("powershell -EncodedCommand {0}".format(encodedcommand), shell=True) # except (WindowsError, IOError): # print "App management: Could not re-install all apps" + + +def dvr(undo): + game_dvr_enabled = allow_game_dvr = 0 + action = "disabled" + if undo: + game_dvr_enabled = allow_game_dvr = 1 + action = "enabled" + + dvr_keys = {'GameDVR_Enabled': [winreg.HKEY_CURRENT_USER, + r'System\GameConfigStore', + 'GameDVR_Enabled', winreg.REG_DWORD, game_dvr_enabled], + 'AllowGameDVR': [winreg.HKEY_LOCAL_MACHINE, + r'SOFTWARE\Policies\Microsoft\Windows\GameDVR', + 'AllowGameDVR', winreg.REG_DWORD, allow_game_dvr]} + + set_registry(dvr_keys) + logger.info("Xbox DVR: successfully {action}".format(action=action)) |