Add "Apply ITS Settings" to Auto Setup

Addresses issue #18
This commit is contained in:
2Shirt 2022-10-08 20:46:24 -07:00
parent 7512f5f2a1
commit 5afb45dbb3
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 23 additions and 3 deletions

View file

@ -41,7 +41,7 @@ BASE_MENUS = {
MenuEntry('Software Bundle', 'auto_install_software_bundle'),
),
'Configure System': (
MenuEntry('Configure Browsers', 'auto_config_browsers'),
MenuEntry('Apply ITS Settings', 'auto_apply_its_settings'),
MenuEntry('Open Shell', 'auto_config_open_shell'),
MenuEntry('Disable Fast Startup', 'auto_disable_fast_startup', selected=False),
MenuEntry('Disable Telemetry', 'auto_shutup_10'),
@ -54,6 +54,7 @@ BASE_MENUS = {
MenuEntry('Windows Activation', 'auto_activate_windows'),
MenuEntry('Windows Explorer', 'auto_config_explorer'),
MenuEntry(r'Windows\Temp Fix', 'auto_windows_temp_fix'),
MenuEntry('Configure Browsers', 'auto_config_browsers'),
MenuEntry('Create System Restore', 'auto_system_restore_create'),
),
'System Information': (

View file

@ -223,6 +223,9 @@ def check_os_and_set_menu_title(title):
def load_preset(menus, presets, title, enable_menu_exit=True):
"""Load menu settings from preset and ask selection question(s)."""
msp = False
# Menu exit entry
if not enable_menu_exit:
MENU_PRESETS.actions['Main Menu'].update({'Disabled':True, 'Hidden':True})
@ -259,11 +262,17 @@ def load_preset(menus, presets, title, enable_menu_exit=True):
for option in ('Disable Fast Startup', 'Enable Hibernation'):
menus['Configure System'].options[option]['Selected'] = True
# Apply ITS settings?
msp = ask('Is this an ITS system?')
if msp:
option = 'Apply ITS Settings'
menus['Configure System'].options[option]['Selected'] = True
# ESET NOD32 AV
print('')
if ask('Install ESET NOD32 AV?'):
if msp or ask('Install ESET NOD32 AV?'):
option = 'ESET NOD32 AV'
if ask(' For ITS/VIP?'):
if msp or ask(' For VIP?'):
option = f'{option} (MSP)'
menus['Install Software'].options[option]['Selected'] = True
@ -420,6 +429,11 @@ def auto_enable_regback():
)
def auto_apply_its_settings():
"""Apply ITS settings."""
TRY_PRINT.run('Apply ITS settings...', apply_its_settings)
def auto_system_restore_enable():
"""Enable System Restore."""
cmd = [
@ -955,6 +969,11 @@ def uninstall_firefox():
# Misc Functions
def apply_its_settings():
"""Apply ITS settings."""
create_custom_power_plan(enable_sleep=False)
def check_secure_boot_status():
"""Check Secure Boot status."""
is_secure_boot_enabled(raise_exceptions=True, show_alert=True)