Disable p2p updates

master
Daniel Berteaud 6 years ago
parent b09fedf8ac
commit e447d0ba64
  1. 2
      WAPT/control
  2. 7
      setup.py

@ -1,5 +1,5 @@
package : fws-system-settings package : fws-system-settings
version : 1 version : 2
architecture : all architecture : all
section : base section : base
priority : optional priority : optional

@ -45,6 +45,9 @@ def install():
if iswin64(): if iswin64():
registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\WOW6432Node\Microsoft\Windows Script Host\Settings', 'Enabled', 0, REG_DWORD) 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(): def uninstall():
print('Re enabling services') print('Re enabling services')
for service in disabled_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) registry_setstring(HKEY_LOCAL_MACHINE, r'Software\Microsoft\Windows Script Host\Settings', 'Enabled', 1, REG_DWORD)
if iswin64(): if iswin64():
registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\WOW6432Node\Microsoft\Windows Script Host\Settings', 'Enabled', 1, REG_DWORD) 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')

Loading…
Cancel
Save