diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index c7a8c6f7..945fde18 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -68,6 +68,11 @@ def config_explorer_user(): write_registry_settings(SETTINGS_EXPLORER_USER, all_users=False) +def config_windows_updates(): + """Configure Windows updates.""" + write_registry_settings(SETTINGS_WINDOWS_UPDATES, all_users=True) + + def create_system_restore_point(): """Create system restore point.""" cmd = [ diff --git a/.bin/Scripts/new_system_setup.py b/.bin/Scripts/new_system_setup.py index d8dd8979..4000c281 100644 --- a/.bin/Scripts/new_system_setup.py +++ b/.bin/Scripts/new_system_setup.py @@ -135,6 +135,8 @@ if __name__ == '__main__': function=disable_windows_telemetry, cs='Done') try_and_print(message='Enabling RegBack...', function=enable_regback, cs='Done') + try_and_print(message='Windows Updates...', + function=config_windows_updates, cs='Done') try_and_print(message='Enabling System Restore...', function=enable_system_restore, cs='Done') try_and_print(message='Updating Clock...', diff --git a/.bin/Scripts/settings/setup.py b/.bin/Scripts/settings/setup.py index c77e2e31..8493f6ca 100644 --- a/.bin/Scripts/settings/setup.py +++ b/.bin/Scripts/settings/setup.py @@ -86,7 +86,8 @@ SETTINGS_EXPLORER_SYSTEM = { 'Status': {'Value': 0}, }, # Disable Telemetry - r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': { + r'SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection': { + # Using SOFTWARE in all caps to avoid collision with 32-bit setting below 'DWORD Items': {'AllowTelemetry': 0}, }, r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': { @@ -179,6 +180,17 @@ VCR_REDISTS = [ '/passive', '/norestart']}, ] +# Windows Updates +SETTINGS_WINDOWS_UPDATES = { + r'Software\Microsoft\WindowsUpdate\UX\Settings': { + 'DWORD Items': { + # Set to non-targeted readiness level + 'BranchReadinessLevel': 32, + 'DeferFeatureUpdatesPeriodInDays': 60, + }, + } + } + if __name__ == '__main__': print("This file is not meant to be called directly.") diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index 7474a07c..c4ee11eb 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -49,14 +49,15 @@ if __name__ == '__main__': function=disable_windows_telemetry, cs='Done') try_and_print(message='Enabling RegBack...', function=enable_regback, cs='Done') + try_and_print(message='Windows Updates...', + function=config_windows_updates, cs='Done') try_and_print(message='Enabling BSoD mini dumps...', function=enable_mini_dumps, cs='Done') try_and_print(message='Enabling System Restore...', function=enable_system_restore, cs='Done') try_and_print(message='Create System Restore point...', function=create_system_restore_point, cs='Done') - try_and_print(message='Enabling Windows Updates...', - function=enable_windows_updates, cs='Done') + enable_windows_updates() try_and_print(message='Updating Clock...', function=update_clock, cs='Done')