From 8ea142cfdf2bd9fb04dae70fbeaea1c7c99d1e66 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 12 May 2019 16:18:50 -0600 Subject: [PATCH 1/4] Reordered sytsem setup actions --- .bin/Scripts/system_setup.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/system_setup.py b/.bin/Scripts/system_setup.py index a9185da8..c41820eb 100644 --- a/.bin/Scripts/system_setup.py +++ b/.bin/Scripts/system_setup.py @@ -71,18 +71,18 @@ SETUP_ACTIONS = OrderedDict({ 'Pause': 'Please enable uBlock Origin for all browsers', }, 'Classic Start': {'New': True, 'Fab': True, 'Cur': False, 'HW': False, 'Function': config_classicstart, 'Win10 only': True,}, - 'Explorer (user)': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': config_explorer_user, 'Win10 only': True,}, - 'Explorer (system)': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': config_explorer_system, 'Win10 only': True,}, - 'Disable telemetry': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': disable_windows_telemetry, 'Win10 only': True,}, - 'Disable Fast Startup': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': disable_fast_startup, 'If answer': 'Fast-Hiber', 'Win10 only': True,}, - 'Enable Hibernation': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': enable_hibernation, 'If answer': 'Fast-Hiber', 'Win10 only': True,}, - 'Enable RegBack': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': enable_regback, 'Win10 only': True,}, - 'Windows 10 Updates': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': config_windows_updates, 'Win10 only': True,}, - 'Enable BSoD mini dumps': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': enable_mini_dumps,}, + 'Config Windows Updates': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': config_windows_updates, 'Win10 only': True,}, 'Enable System Restore': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': enable_system_restore,}, 'Create System Restore': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': create_system_restore_point,}, - 'Update Clock': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': update_clock,}, + 'Disable Fast Startup': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': disable_fast_startup, 'If answer': 'Fast-Hiber', 'Win10 only': True,}, + 'Disable telemetry': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': disable_windows_telemetry, 'Win10 only': True,}, + 'Enable BSoD mini dumps': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': enable_mini_dumps,}, + 'Enable Hibernation': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': enable_hibernation, 'If answer': 'Fast-Hiber', 'Win10 only': True,}, + 'Enable RegBack': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': enable_regback, 'Win10 only': True,}, + 'Explorer (system)': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': config_explorer_system, 'Win10 only': True,}, + 'Explorer (user)': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': config_explorer_user, 'Win10 only': True,}, 'Restart Explorer': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': restart_explorer,}, + 'Update Clock': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': update_clock,}, # Cleanup 'Cleaning up': {'Info': True}, From 2ffa16248f133e29c2e79a5332f6e790b70d487c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 12 May 2019 17:00:49 -0600 Subject: [PATCH 2/4] Added missing actions from other scripts * system_setup.py should now have all actions performed by * new_system_setup.py * post_d7.py * system_checklist.py * system_checklist_hw.py * user_checklist.py --- .bin/Scripts/system_setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/system_setup.py b/.bin/Scripts/system_setup.py index c41820eb..bdd8951d 100644 --- a/.bin/Scripts/system_setup.py +++ b/.bin/Scripts/system_setup.py @@ -79,6 +79,7 @@ SETUP_ACTIONS = OrderedDict({ 'Enable BSoD mini dumps': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': enable_mini_dumps,}, 'Enable Hibernation': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': enable_hibernation, 'If answer': 'Fast-Hiber', 'Win10 only': True,}, 'Enable RegBack': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': enable_regback, 'Win10 only': True,}, + 'Enable Windows Updates': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': enable_windows_updates,}, 'Explorer (system)': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': config_explorer_system, 'Win10 only': True,}, 'Explorer (user)': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': config_explorer_user, 'Win10 only': True,}, 'Restart Explorer': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': restart_explorer,}, @@ -87,10 +88,11 @@ SETUP_ACTIONS = OrderedDict({ # Cleanup 'Cleaning up': {'Info': True}, 'AdwCleaner': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': cleanup_adwcleaner,}, + 'd7II': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': cleanup_d7ii,}, 'Desktop': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': cleanup_desktop,}, 'Emsisoft s2cmd': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': cleanup_emsisoft,}, 'Registry Backup(s)': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': cleanup_regbackups,}, - 'KIT_NAME_FULL': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': delete_empty_folders,}, + 'KIT_NAME_FULL': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': delete_empty_folders,}, # System Info 'Exporting system info': {'Info': True}, @@ -107,6 +109,7 @@ SETUP_ACTIONS = OrderedDict({ 'BIOS Activation': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': activate_with_bios, 'If not activated': True,}, 'Secure Boot': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': check_secure_boot_status, 'KWArgs': {'show_alert': True},}, 'Installed RAM': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': show_installed_ram, 'KWArgs': {'ns': 'Unknown', 'silent_function': False},}, + 'Temp size': {'New': False, 'Fab': False, 'Cur': True, 'HW': False, 'Function': show_temp_files_size, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},}, 'Show free space': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': show_free_space, 'Just run': True,}, 'Installed AV': {'New': True, 'Fab': True, 'Cur': True, 'HW': True, 'Function': get_installed_antivirus, 'KWArgs': {'ns': 'Unknown', 'print_return': True},}, 'Installed Office': {'New': True, 'Fab': True, 'Cur': True, 'HW': False, 'Function': get_installed_office, 'KWArgs': {'ns': 'Unknown', 'print_return': True},}, From 20cfe6a81d3b914dc514b6bf827d3328f42b1c6c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 12 May 2019 17:03:13 -0600 Subject: [PATCH 3/4] Adjusted launchers * Removed deprecated scripts * Moved Activation to Misc * It's handled automatically in system_setup.py * Addresses issue #93 --- .bin/Scripts/settings/launchers.py | 63 +++--------------------------- 1 file changed, 6 insertions(+), 57 deletions(-) diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 516f50ed..ca7ea636 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -2,12 +2,6 @@ LAUNCHERS = { r'(Root)': { - 'Activate Windows': { - 'L_TYPE': 'PyScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'activate.py', - 'L_ELEV': 'True', - }, 'd7II': { 'L_TYPE': 'Executable', 'L_PATH': 'd7II', @@ -19,12 +13,6 @@ LAUNCHERS = { 'L_ITEM': 'system_setup.py', 'L_ELEV': 'True', }, - 'Post-d7II Work': { - 'L_TYPE': 'PyScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'post_d7.py', - 'L_ELEV': 'True', - }, }, r'.bin\Scripts\launchers_for_d7': { 'Browser Reset': { @@ -33,20 +21,6 @@ LAUNCHERS = { 'L_ITEM': 'reset_browsers.py', 'L_ARGS': 'd7mode', }, - 'Install SW Bundle': { - 'L_TYPE': 'PyScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'install_sw_bundle.py', - 'L_ARGS': 'd7mode', - 'L_ELEV': 'True', - }, - 'System Checklist': { - 'L_TYPE': 'PyScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'system_checklist.py', - 'L_ARGS': 'd7mode', - 'L_ELEV': 'True', - }, 'System Diagnostics': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', @@ -54,12 +28,6 @@ LAUNCHERS = { 'L_ARGS': 'd7mode', 'L_ELEV': 'True', }, - 'User Checklist': { - 'L_TYPE': 'PyScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'user_checklist.py', - 'L_ARGS': 'd7mode', - }, 'Disable Windows Updates': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', @@ -516,6 +484,12 @@ LAUNCHERS = { }, }, r'Misc': { + 'Activate Windows': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'activate.py', + 'L_ELEV': 'True', + }, 'Cleanup CBS Temp Files': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', @@ -591,31 +565,6 @@ LAUNCHERS = { 'L_ARGS': '"%bin%\XMPlay\music.7z"', }, }, - r'Misc\Deprecated': { - 'New System Setup': { - 'L_TYPE': 'PyScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'new_system_setup.py', - 'L_ELEV': 'True', - }, - 'System Checklist': { - 'L_TYPE': 'PyScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'system_checklist.py', - 'L_ELEV': 'True', - }, - 'System Checklist (HW)': { - 'L_TYPE': 'PyScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'system_checklist_hw.py', - 'L_ELEV': 'True', - }, - 'User Checklist': { - 'L_TYPE': 'PyScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'user_checklist.py', - }, - }, r'Repairs': { 'AdwCleaner': { 'L_TYPE': 'Executable', From 3f9ad7842d6fc0667f2eebd858496a7ab19d76ad Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 12 May 2019 17:04:52 -0600 Subject: [PATCH 4/4] Removed deprecated scripts * All replaced with system_setup.py * Fixes issue #93 --- .bin/Scripts/new_system_setup.py | 205 ---------------------------- .bin/Scripts/post_d7.py | 57 -------- .bin/Scripts/system_checklist.py | 164 ---------------------- .bin/Scripts/system_checklist_hw.py | 126 ----------------- .bin/Scripts/user_checklist.py | 103 -------------- 5 files changed, 655 deletions(-) delete mode 100644 .bin/Scripts/new_system_setup.py delete mode 100644 .bin/Scripts/post_d7.py delete mode 100644 .bin/Scripts/system_checklist.py delete mode 100644 .bin/Scripts/system_checklist_hw.py delete mode 100644 .bin/Scripts/user_checklist.py diff --git a/.bin/Scripts/new_system_setup.py b/.bin/Scripts/new_system_setup.py deleted file mode 100644 index 08f963be..00000000 --- a/.bin/Scripts/new_system_setup.py +++ /dev/null @@ -1,205 +0,0 @@ -# Wizard Kit: New system setup - -import os -import sys - -# Init -sys.path.append(os.path.dirname(os.path.realpath(__file__))) -from functions.activation import * -from functions.browsers import * -from functions.cleanup import * -from functions.info import * -from functions.product_keys import * -from functions.setup import * -from functions.sw_diags import * -init_global_vars() -os.system('title {}: New System Setup'.format(KIT_NAME_FULL)) -set_log_file('New System Setup.log') - -if __name__ == '__main__': - other_results = { - 'Error': { - 'BIOSKeyNotFoundError': 'BIOS key not found', - 'CalledProcessError': 'Unknown Error', - 'FileNotFoundError': 'File not found', - 'GenericError': 'Unknown Error', - 'Not4KAlignedError': 'False', - 'SecureBootDisabledError': 'Disabled', - }, - 'Warning': { - 'GenericRepair': 'Repaired', - 'NoProfilesError': 'No profiles found', - 'NotInstalledError': 'Not installed', - 'OSInstalledLegacyError': 'OS installed Legacy', - 'SecureBootNotAvailError': 'Not available', - 'SecureBootUnknownError': 'Unknown', - 'UnsupportedOSError': 'Unsupported OS', - }} - try: - stay_awake() - clear_screen() - - # Check installed OS - if os_is_unsupported(show_alert=True): - print_warning('OS version not supported by this script') - if not ask('Continue anyway? (NOT RECOMMENDED)'): - abort() - - # Select AV software - # NOTE: Truth tuple is (ESET, ESET_PUPS, MSE) - av_options = [ - {'Name': 'ESET NOD32', - 'Truths': (True, True, False),}, - {'Name': 'ESET NOD32 (no PUP/PUW scans)', - 'Truths': (True, False, False),}, - {'Name': 'Microsoft Security Essentials', - 'Disabled': global_vars['OS']['Version'] not in ['7'], - 'Truths': (False, False, True),}, - ] - actions = [ - {'Name': 'None', 'Letter': 'N'}, - {'Name': 'Quit', 'Letter': 'Q'}, - ] - selection = menu_select( - 'Please select an option to install', - main_entries=av_options, - action_entries=actions) - if selection.isnumeric(): - index = int(selection) - 1 - answer_eset, answer_pups, answer_mse = av_options[index]['Truths'] - elif selection == 'Q': - abort() - else: - answer_eset = False - answer_pups = False - answer_mse = False - - # Install LibreOffice? - answer_libreoffice = ask('Install LibreOffice?') - - # Install software - print_info('Installing Programs') - install_vcredists() - if answer_eset: - install_eset_nod32_av(scan_pups=answer_pups) - if answer_libreoffice: - try_and_print(message='LibreOffice...', - function=install_libreoffice, cs='done', - quickstart=True, - register_mso_types=True, - use_mso_formats=True, - vcredist=False, - ) - result = try_and_print( - message='Ninite bundle...', - function=install_ninite_bundle, cs='Started', - mse=answer_mse, libreoffice=answer_libreoffice, - other_results=other_results) - try: - for proc in result['Out']: - # Wait for all processes to finish - print_standard('Waiting for installations to finish...') - proc.wait() - except KeyboardInterrupt: - pass - - # Scan for supported browsers - print_info('Scanning for browsers') - scan_for_browsers(skip_ie=True) - - # Install extensions - print_info('Installing Extensions') - try_and_print(message='Classic Shell skin...', - function=install_classicstart_skin, - other_results=other_results) - try_and_print(message='Google Chrome extensions...', - function=install_chrome_extensions) - try_and_print(message='Mozilla Firefox extensions...', - function=install_firefox_extensions, - other_results=other_results) - - # Configure software - print_info('Configuring programs') - install_adblock() - print_standard('Please enable uBlock Origin for all browsers.') - pause() - if global_vars['OS']['Version'] == '10': - try_and_print(message='ClassicStart...', - function=config_classicstart, cs='Done') - 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 (system)...', - function=config_explorer_system, cs='Done') - try_and_print(message='Disabling telemetry...', - 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...', - 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:', - function=show_os_name, ns='Unknown', silent_function=False) - try_and_print(message='Activation:', - function=show_os_activation, ns='Unknown', silent_function=False) - if (not windows_is_activated() - and global_vars['OS']['Version'] in ('8', '8.1', '10')): - try_and_print(message='BIOS Activation:', - function=activate_with_bios, - other_results=other_results) - try_and_print(message='Secure Boot Status:', - function=check_secure_boot_status, other_results=other_results) - try_and_print(message='Installed RAM:', - function=show_installed_ram, ns='Unknown', silent_function=False) - show_free_space() - try_and_print(message='Installed Antivirus:', - function=get_installed_antivirus, ns='Unknown', - other_results=other_results, print_return=True) - try_and_print(message='Partitions 4K aligned:', - function=check_4k_alignment, cs='True', - other_results=other_results) - - # Play audio, show devices, open Windows updates, and open Activation - try_and_print(message='Opening Device Manager...', - function=open_device_manager, cs='Started') - try_and_print(message='Opening HWiNFO (Sensors)...', - function=run_hwinfo_sensors, cs='Started', other_results=other_results) - try_and_print(message='Opening SDI Origin...', - function=open_snappy_driver_origin, cs='Started') - try_and_print(message='Opening Windows Updates...', - function=open_windows_updates, cs='Started') - if not windows_is_activated(): - try_and_print(message='Opening Windows Activation...', - function=open_windows_activation, cs='Started') - sleep(3) - try_and_print(message='Running XMPlay...', - function=run_xmplay, cs='Started', other_results=other_results) - try: - check_secure_boot_status(show_alert=True) - except: - # Only trying to open alert message boxes - pass - - # Done - print_standard('\nDone.') - pause('Press Enter to exit...') - exit_script() - except SystemExit as sys_exit: - exit_script(sys_exit.code) - except: - major_exception() - -# vim: sts=2 sw=2 ts=2 diff --git a/.bin/Scripts/post_d7.py b/.bin/Scripts/post_d7.py deleted file mode 100644 index 87596281..00000000 --- a/.bin/Scripts/post_d7.py +++ /dev/null @@ -1,57 +0,0 @@ -# Wizard Kit: Post-d7II items - -import os -import sys - -# Init -os.chdir(os.path.dirname(os.path.realpath(__file__))) -sys.path.append(os.getcwd()) -from functions.browsers import * -from functions.cleanup import * -from functions.setup import * -init_global_vars() -os.system('title {}: Post-d7II Work'.format(KIT_NAME_FULL)) -set_log_file('Post-d7II Work.log') - -if __name__ == '__main__': - try: - stay_awake() - clear_screen() - print_info('{}: Post-d7II Work\n'.format(KIT_NAME_FULL)) - other_results = { - 'Warning': { - 'NotInstalledError': 'Not installed', - 'NoProfilesError': 'No profiles found', - }} - - # Scan for Firefox browsers - print_info('Scanning for Firefox browsers') - scan_for_browsers(just_firefox=True) - - # Install uBlock Origin - print_info('Installing uBlock Origin') - install_adblock(just_firefox=True) - print_standard('Please enable uBlock Origin in Firefox.') - pause() - - # Cleanup - print_info('Cleanup') - try_and_print(message='d7II...', - function=cleanup_d7ii, cs='Done') - try_and_print(message='{}...'.format(KIT_NAME_FULL), - function=delete_empty_folders, cs='Done', - folder_path=global_vars['ClientDir']) - - # Run speedtest - popen_program(['start', '', 'https://fast.com'], shell=True) - - # Done - print_standard('\nDone.') - pause('Press Enter to exit...') - exit_script() - except SystemExit as sys_exit: - exit_script(sys_exit.code) - except: - major_exception() - -# vim: sts=2 sw=2 ts=2 diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py deleted file mode 100644 index 38a82184..00000000 --- a/.bin/Scripts/system_checklist.py +++ /dev/null @@ -1,164 +0,0 @@ -# Wizard Kit: System Checklist - -import os -import sys - -# Init -sys.path.append(os.path.dirname(os.path.realpath(__file__))) -from functions.activation import * -from functions.cleanup import * -from functions.info import * -from functions.product_keys import * -from functions.setup import * -from functions.sw_diags import * -from functions.windows_updates import * -init_global_vars() -os.system('title {}: System Checklist Tool'.format(KIT_NAME_FULL)) -set_log_file('System Checklist.log') -D7_MODE = 'd7mode' in sys.argv - -if __name__ == '__main__': - try: - stay_awake() - clear_screen() - print_info('{}: System Checklist Tool\n'.format(KIT_NAME_FULL)) - ticket_number = get_ticket_number() - other_results = { - 'Error': { - 'BIOSKeyNotFoundError': 'BIOS key not found', - 'CalledProcessError': 'Unknown Error', - 'FileNotFoundError': 'File not found', - 'GenericError': 'Unknown Error', - 'Not4KAlignedError': 'False', - 'SecureBootDisabledError': 'Disabled', - }, - 'Warning': { - 'OSInstalledLegacyError': 'OS installed Legacy', - 'SecureBootNotAvailError': 'Not available', - 'SecureBootUnknownError': 'Unknown', - }} - if ENABLED_TICKET_NUMBERS: - print_info('Starting System Checklist for Ticket #{}\n'.format( - ticket_number)) - - # Configure - print_info('Configure') - if global_vars['OS']['Version'] == '10': - try_and_print(message='Explorer...', - function=config_explorer_system, cs='Done') - try_and_print(message='Disabling telemetry...', - 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', silent=True) - 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...', - function=cleanup_adwcleaner, cs='Done', other_results=other_results) - try_and_print(message='Desktop...', - function=cleanup_desktop, cs='Done') - try_and_print(message='Emsisoft a2cmd...', - function=cleanup_emsisoft, cs='Done') - try_and_print(message='Registry Backup(s)...', - function=cleanup_regbackups, cs='Done') - try_and_print(message='{}...'.format(KIT_NAME_FULL), - function=delete_empty_folders, cs='Done', - folder_path=global_vars['ClientDir']) - - # Export system info - if not D7_MODE: - print_info('Backup System Information') - try_and_print(message='AIDA64 reports...', - function=run_aida64, cs='Done', other_results=other_results) - try_and_print(message='File listing...', - function=backup_file_list, cs='Done', other_results=other_results) - try_and_print(message='Power plans...', - function=backup_power_plans, cs='Done') - try_and_print(message='Product Keys...', other_results=other_results, - function=run_produkey, cs='Done') - try_and_print(message='Registry...', - function=backup_registry, cs='Done', other_results=other_results) - - # User data - print_info('User Data') - show_user_data_summary() - - # Summary - print_info('Summary') - try_and_print(message='Operating System:', - function=show_os_name, ns='Unknown', silent_function=False) - try_and_print(message='Activation:', - function=show_os_activation, ns='Unknown', silent_function=False) - if (not windows_is_activated() - and global_vars['OS']['Version'] in ('8', '8.1', '10')): - try_and_print(message='BIOS Activation:', - function=activate_with_bios, - other_results=other_results) - try_and_print(message='Secure Boot Status:', - function=check_secure_boot_status, other_results=other_results) - try_and_print(message='Installed RAM:', - function=show_installed_ram, ns='Unknown', silent_function=False) - show_free_space() - try_and_print(message='Installed Antivirus:', - function=get_installed_antivirus, ns='Unknown', - other_results=other_results, print_return=True) - try_and_print(message='Installed Office:', - function=get_installed_office, ns='Unknown', - other_results=other_results, print_return=True) - try_and_print(message='Partitions 4K aligned:', - function=check_4k_alignment, cs='True', - other_results=other_results) - if D7_MODE: - try_and_print(message='Product Keys:', - function=get_product_keys, ns='Unknown', print_return=True) - - # Play audio, show devices, open Windows updates, and open Activation - try_and_print(message='Opening Device Manager...', - function=open_device_manager, cs='Started') - try_and_print(message='Opening HWiNFO (Sensors)...', - function=run_hwinfo_sensors, cs='Started', other_results=other_results) - try_and_print(message='Opening Windows Updates...', - function=open_windows_updates, cs='Started') - if not windows_is_activated(): - try_and_print(message='Opening Windows Activation...', - function=open_windows_activation, cs='Started') - sleep(3) - try_and_print(message='Running XMPlay...', - function=run_xmplay, cs='Started', other_results=other_results) - try: - check_secure_boot_status(show_alert=True) - except Exception: - # Only trying to open alert message boxes - pass - - # Done - print_standard('\nDone.') - pause('Press Enter exit...') - if D7_MODE: - show_alert_box( - message='Please run the Post-d7II script after ending the session.', - title='{} Notice'.format(KIT_NAME_FULL), - ) - exit_script() - except SystemExit as sys_exit: - exit_script(sys_exit.code) - except: - major_exception() - -# vim: sts=2 sw=2 ts=2 diff --git a/.bin/Scripts/system_checklist_hw.py b/.bin/Scripts/system_checklist_hw.py deleted file mode 100644 index b399064b..00000000 --- a/.bin/Scripts/system_checklist_hw.py +++ /dev/null @@ -1,126 +0,0 @@ -# Wizard Kit: System HW Checklist - -import os -import sys - -# Init -sys.path.append(os.path.dirname(os.path.realpath(__file__))) -from functions.activation import * -from functions.cleanup import * -from functions.info import * -from functions.product_keys import * -from functions.setup import * -from functions.sw_diags import * -init_global_vars() -os.system('title {}: System HW Checklist Tool'.format(KIT_NAME_FULL)) -set_log_file('System HW Checklist.log') - -if __name__ == '__main__': - try: - stay_awake() - clear_screen() - print_info('{}: System HW Checklist Tool\n'.format(KIT_NAME_FULL)) - ticket_number = get_ticket_number() - other_results = { - 'Error': { - 'BIOSKeyNotFoundError': 'BIOS key not found', - 'CalledProcessError': 'Unknown Error', - 'FileNotFoundError': 'File not found', - 'GenericError': 'Unknown Error', - 'Not4KAlignedError': 'False', - 'SecureBootDisabledError': 'Disabled', - }, - 'Warning': { - 'OSInstalledLegacyError': 'OS installed Legacy', - 'SecureBootNotAvailError': 'Not available', - 'SecureBootUnknownError': 'Unknown', - }} - if ENABLED_TICKET_NUMBERS: - print_info('Starting System Checklist for Ticket #{}\n'.format( - ticket_number)) - - # Configure - print_info('Configure') - if global_vars['OS']['Version'] == '10': - try_and_print(message='Enabling RegBack...', - function=enable_regback, 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') - - # Export system info - print_info('Backup System Information') - try_and_print(message='AIDA64 reports...', - function=run_aida64, cs='Done', other_results=other_results) - try_and_print(message='File listing...', - function=backup_file_list, cs='Done', other_results=other_results) - try_and_print(message='Power plans...', - function=backup_power_plans, cs='Done') - try_and_print(message='Product Keys...', other_results=other_results, - function=run_produkey, cs='Done') - try_and_print(message='Registry...', - function=backup_registry, cs='Done', other_results=other_results) - - # Cleanup - print_info('Cleanup') - try_and_print(message='{}...'.format(KIT_NAME_FULL), - function=delete_empty_folders, cs='Done', - folder_path=global_vars['ClientDir']) - - # User data - print_info('User Data') - show_user_data_summary() - - # Summary - print_info('Summary') - try_and_print(message='Operating System:', - function=show_os_name, ns='Unknown', silent_function=False) - try_and_print(message='Activation:', - function=show_os_activation, ns='Unknown', silent_function=False) - try_and_print(message='Secure Boot Status:', - function=check_secure_boot_status, other_results=other_results) - try_and_print(message='Installed RAM:', - function=show_installed_ram, ns='Unknown', silent_function=False) - show_free_space() - try_and_print(message='Installed Antivirus:', - function=get_installed_antivirus, ns='Unknown', - other_results=other_results, print_return=True) - try_and_print(message='Installed Office:', - function=get_installed_office, ns='Unknown', - other_results=other_results, print_return=True) - try_and_print(message='Partitions 4K aligned:', - function=check_4k_alignment, cs='True', - other_results=other_results) - - # Play audio, show devices, open Windows updates, and open Activation - try_and_print(message='Opening Device Manager...', - function=open_device_manager, cs='Started') - try_and_print(message='Opening HWiNFO (Sensors)...', - function=run_hwinfo_sensors, cs='Started', other_results=other_results) - try_and_print(message='Opening Windows Updates...', - function=open_windows_updates, cs='Started') - if not windows_is_activated(): - try_and_print(message='Opening Windows Activation...', - function=open_windows_activation, cs='Started') - sleep(3) - try_and_print(message='Running XMPlay...', - function=run_xmplay, cs='Started', other_results=other_results) - try: - check_secure_boot_status(show_alert=True) - except Exception: - # Only trying to open alert message boxes - pass - - # Done - print_standard('\nDone.') - pause('Press Enter exit...') - exit_script() - except SystemExit as sys_exit: - exit_script(sys_exit.code) - except: - major_exception() - -# vim: sts=2 sw=2 ts=2 diff --git a/.bin/Scripts/user_checklist.py b/.bin/Scripts/user_checklist.py deleted file mode 100644 index 33319223..00000000 --- a/.bin/Scripts/user_checklist.py +++ /dev/null @@ -1,103 +0,0 @@ -# Wizard Kit: User Checklist - -import os -import sys - -# Init -sys.path.append(os.path.dirname(os.path.realpath(__file__))) -from functions.browsers import * -from functions.cleanup import * -from functions.setup import * -init_global_vars() -os.system('title {}: User Checklist Tool'.format(KIT_NAME_FULL)) -set_log_file('User Checklist ({USERNAME}).log'.format(**global_vars['Env'])) -D7_MODE = 'd7mode' in sys.argv - -if __name__ == '__main__': - try: - stay_awake() - clear_screen() - print_info('{}: User Checklist\n'.format(KIT_NAME_FULL)) - other_results = { - 'Warning': { - 'NotInstalledError': 'Not installed', - 'NoProfilesError': 'No profiles found', - }} - #answer_config_browsers = ask('Install adblock?') - answer_config_browsers = True - if answer_config_browsers: - if D7_MODE: - # This is handled by another script option in d7ii - answer_reset_browsers = False - else: - answer_reset_browsers = ask( - 'Reset browsers to safe defaults first?') - if global_vars['OS']['Version'] == '10': - answer_config_classicshell = True - answer_config_explorer_user = True - - # Cleanup - print_info('Cleanup') - try_and_print(message='Desktop...', - function=cleanup_desktop, cs='Done') - - # Scan for supported browsers - print_info('Scanning for browsers') - scan_for_browsers(skip_ie=True) - - # Homepages - if not D7_MODE: - print_info('Current homepages') - list_homepages() - - # Backup - if not D7_MODE: - # Done during system_diagnostics - print_info('Backing up browsers') - backup_browsers() - - # Reset - if answer_config_browsers and answer_reset_browsers: - print_info('Resetting browsers') - reset_browsers() - - # Configure - print_info('Configuring programs') - if answer_config_browsers: - install_adblock(skip_firefox=D7_MODE) - print_standard('Please enable uBlock Origin') - pause() - if global_vars['OS']['Version'] == '10': - if answer_config_classicshell: - try_and_print(message='ClassicStart...', - function=config_classicstart, cs='Done') - if answer_config_explorer_user: - try_and_print(message='Explorer...', - function=config_explorer_user, cs='Done') - if (not answer_config_browsers - and not answer_config_classicshell - and not answer_config_explorer_user): - print_warning(' Skipped') - else: - if not answer_config_browsers: - print_warning(' Skipped') - - # Restart Explorer - try_and_print(message='Restarting Explorer...', - function=restart_explorer, cs='Done') - - # Run speedtest - if not D7_MODE: - popen_program(['start', '', 'https://fast.com'], shell=True) - - # Done - if not D7_MODE: - print_standard('\nDone.') - pause('Press Enter to exit...') - exit_script() - except SystemExit as sys_exit: - exit_script(sys_exit.code) - except: - major_exception() - -# vim: sts=2 sw=2 ts=2