Removed deprecated scripts
* All replaced with system_setup.py * Fixes issue #93
This commit is contained in:
parent
20cfe6a81d
commit
3f9ad7842d
5 changed files with 0 additions and 655 deletions
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
Loading…
Reference in a new issue