From e447d0ba64e082e1f4e26a7a926bbd71a68baede Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 10 Dec 2018 21:30:02 +0100 Subject: [PATCH] Disable p2p updates --- WAPT/control | 2 +- setup.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/WAPT/control b/WAPT/control index 07c1973..8ac5446 100644 --- a/WAPT/control +++ b/WAPT/control @@ -1,5 +1,5 @@ package : fws-system-settings -version : 1 +version : 2 architecture : all section : base priority : optional diff --git a/setup.py b/setup.py index 65ff023..8b285dd 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,9 @@ def install(): if iswin64(): registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\WOW6432Node\Microsoft\Windows Script Host\Settings', 'Enabled', 0, REG_DWORD) + print('Disabling P2P updates delivery') + registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization', 'DODownloadMode', 0, REG_DWORD) + def uninstall(): print('Re enabling services') for service in disabled_services: @@ -55,3 +58,7 @@ def uninstall(): registry_setstring(HKEY_LOCAL_MACHINE, r'Software\Microsoft\Windows Script Host\Settings', 'Enabled', 1, REG_DWORD) if iswin64(): registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\WOW6432Node\Microsoft\Windows Script Host\Settings', 'Enabled', 1, REG_DWORD) + + prin('Removing DeliveryOptimization settings') + with reg_openkey_noredir(HKEY_LOCAL_MACHINE, r'SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization', sam=KEY_WRITE) as reg_key: + reg_delvalue(reg_key, 'DODownloadMode')