diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index 464e75ad..dc8707f2 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -66,9 +66,13 @@ def config_explorer_system(): write_registry_settings(SETTINGS_EXPLORER_SYSTEM, all_users=True) -def config_explorer_user(): - """Configure Windows Explorer for current user.""" - write_registry_settings(SETTINGS_EXPLORER_USER, all_users=False) +def config_explorer_user(setup_mode='All'): + """Configure Windows Explorer for current user per setup_mode.""" + settings_explorer_user = { + k: v for k, v in SETTINGS_EXPLORER_USER.items() + if setup_mode not in v.get('Invalid modes', []) + } + write_registry_settings(settings_explorer_user, all_users=False) def config_windows_updates(): diff --git a/.bin/Scripts/settings/setup.py b/.bin/Scripts/settings/setup.py index 8fd6a5c4..79c7a0e9 100644 --- a/.bin/Scripts/settings/setup.py +++ b/.bin/Scripts/settings/setup.py @@ -109,6 +109,7 @@ SETTINGS_EXPLORER_SYSTEM = { SETTINGS_EXPLORER_USER = { # Desktop icons r'Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu': { + 'Invalid modes': ['Cur'], 'DWORD Items': { # This PC '{20D04FE0-3AEA-1069-A2D8-08002B30309D}': 0, @@ -117,6 +118,7 @@ SETTINGS_EXPLORER_USER = { }, }, r'Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel': { + 'Invalid modes': ['Cur'], 'DWORD Items': { # This PC '{20D04FE0-3AEA-1069-A2D8-08002B30309D}': 0, @@ -136,21 +138,28 @@ SETTINGS_EXPLORER_USER = { }, # File Explorer r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced': { + 'Invalid modes': ['Cur'], 'DWORD Items': { # Replace PowerShell with CMD in Win+X menu 'DontUsePowerShellOnWinX': 1, # Change default Explorer view to "Computer" 'LaunchTo': 1, + }, + }, + r'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced': { + 'DWORD Items': { # Launch Folder Windows in a Separate Process 'SeparateProcess': 1, }, }, # Hide People bar r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People': { + 'Invalid modes': ['Cur'], 'DWORD Items': {'PeopleBand': 0}, }, # Hide Search button / box r'Software\Microsoft\Windows\CurrentVersion\Search': { + 'Invalid modes': ['Cur'], 'DWORD Items': {'SearchboxTaskbarMode': 1}, }, } diff --git a/.bin/Scripts/system_setup.py b/.bin/Scripts/system_setup.py index c1d8321a..9a8872b2 100644 --- a/.bin/Scripts/system_setup.py +++ b/.bin/Scripts/system_setup.py @@ -193,6 +193,7 @@ def get_actions(setup_mode, answers): # Handle "special" actions if _key == 'KIT_NAME_FULL': + # Cleanup WK folders _key = KIT_NAME_FULL _action['KWArgs'] = {'folder_path': global_vars['ClientDir']} elif _key == 'Ninite bundle': @@ -201,6 +202,9 @@ def get_actions(setup_mode, answers): kw.lower(): kv for kw, kv in answers.items() if SETUP_QUESTIONS.get(kw, {}).get('Ninite', False) }) + elif _key == 'Explorer (user)': + # Explorer settings (user) + _action['KWArgs'] = {'setup_mode': setup_mode} # Add to dict actions[_key] = _action