From c4d46787a609fe10a1d1cbc56069a6b368926e91 Mon Sep 17 00:00:00 2001 From: Kevin Guerineau Date: Sun, 2 Jun 2019 18:21:50 +0200 Subject: [PATCH] Add comment in install. Add r in registry path --- kg-disable-background-apps-wapt/setup.py | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/kg-disable-background-apps-wapt/setup.py b/kg-disable-background-apps-wapt/setup.py index 1d1a6b2..fa2a92c 100644 --- a/kg-disable-background-apps-wapt/setup.py +++ b/kg-disable-background-apps-wapt/setup.py @@ -5,26 +5,11 @@ uninstallkey = [] def install(): print('installing %s' % control.asrequirement()) - # put here what to do when package is installed on host - # implicit context variables are WAPT, basedir, control, user, params, run + print('To use this package configuration, please execute "wapt-get session-setup ALL"') -def uninstall(): - print('uninstalling %s' % control.asrequirement()) - # put here what to do when package is removed from host - # implicit context variables are WAPT, control, user, params, run def session_setup(): print('Session setup for %s' % control.asrequirement()) - registry_set(HKEY_CURRENT_USER,'Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications','GlobalUserDisabled',1) - registry_set(HKEY_CURRENT_USER,'Software\Microsoft\Windows\CurrentVersion\Search','BackgroundAppGlobalToggle',0) - -def update_package(): - print('Update package content from upstream binary sources') - # put here what to do to update package content with newer installers. - # launched with command wapt-get update-package-sources - # implicit context variables are WAPT, basedir, control, user, params, run - # if attributes in control are changed, they should be explicitly saved to package file with control.save_control_to_wapt() - -if __name__ == '__main__': - update_package() + registry_set(HKEY_CURRENT_USER,r'Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications','GlobalUserDisabled',1) + registry_set(HKEY_CURRENT_USER,r'Software\Microsoft\Windows\CurrentVersion\Search','BackgroundAppGlobalToggle',0)