diff options
author | Alexey Galkin <leks.molecul@gmail.com> | 2019-02-01 19:29:46 +0300 |
---|---|---|
committer | Ruined1 <ruined1@gmail.com> | 2019-02-11 20:05:33 +0300 |
commit | c456bd4ba6a5a3a733ee30b5207413fd86ab7bed (patch) | |
tree | 51cf8c6ad26467f09466cda0eefb48cfaefbd3fd /dwt_util.py | |
parent | 30d5f5b65f2487d51754355c06fa64a45f4537b3 (diff) |
Implement Xbox DVR disabling
Diffstat (limited to 'dwt_util.py')
-rw-r--r-- | dwt_util.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dwt_util.py b/dwt_util.py index 4ad1c6f..68db665 100644 --- a/dwt_util.py +++ b/dwt_util.py @@ -354,3 +354,20 @@ 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)) |