Restart Explorer after configuring

* Allows changes to be seen without restarting manually
This commit is contained in:
2Shirt 2019-03-17 20:23:25 -06:00
parent b84d4eb6b8
commit 4cb14c6429
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
4 changed files with 22 additions and 2 deletions

View file

@ -4,6 +4,7 @@ from functions.update import *
from settings.setup import *
# Configuration
def config_classicstart():
"""Configure ClassicStart."""
# User level, not system level
@ -225,6 +226,13 @@ def open_windows_updates():
popen_program(['control', '/name', 'Microsoft.WindowsUpdate'])
def restart_explorer():
"""Restart Explorer."""
kill_process('explorer.exe')
sleep(2)
kill_process('explorer.exe')
if __name__ == '__main__':
print("This file is not meant to be called directly.")

View file

@ -93,13 +93,13 @@ if __name__ == '__main__':
if global_vars['OS']['Version'] == '10':
try_and_print(message='ClassicStart...',
function=config_classicstart, cs='Done')
try_and_print(message='Explorer...',
try_and_print(message='Explorer (user)...',
function=config_explorer_user, cs='Done')
# Configure system
print_info('Configuring system')
if global_vars['OS']['Version'] == '10':
try_and_print(message='Explorer...',
try_and_print(message='Explorer (system)...',
function=config_explorer_system, cs='Done')
try_and_print(message='Disabling telemetry...',
function=disable_windows_telemetry, cs='Done')
@ -108,6 +108,10 @@ if __name__ == '__main__':
try_and_print(message='Updating Clock...',
function=update_clock, cs='Done')
# Restart Explorer
try_and_print(message='Restarting Explorer...',
function=restart_explorer, cs='Done')
# Summary
print_info('Summary')
try_and_print(message='Operating System:',

View file

@ -48,6 +48,10 @@ if __name__ == '__main__':
try_and_print(message='Updating Clock...',
function=update_clock, cs='Done')
# Restart Explorer
try_and_print(message='Restarting Explorer...',
function=restart_explorer, cs='Done')
# Cleanup
print_info('Cleanup')
try_and_print(message='AdwCleaner...',

View file

@ -71,6 +71,10 @@ if __name__ == '__main__':
if not answer_config_browsers:
print_warning(' Skipped')
# Restart Explorer
try_and_print(message='Restarting Explorer...',
function=restart_explorer, cs='Done')
# Run speedtest
popen_program(['start', '', 'https://fast.com'], shell=True)