* "ClientDir\Info" renamed to "ClientDir\Logs"
* Logs are sorted into subdirs based on the source:
* KIT_NAME_FULL: WizardKit logs
* d7II: d7II logs
* Tools: Logs from tools called by WizardKit or d7II
* (no subdir): System information
* "ClientDir\Backups"
* Switched to "Backups\Source\{Date}" from "Backups\{Date}\Source"
38 lines
1 KiB
Python
38 lines
1 KiB
Python
# Wizard Kit: Exit SafeMode by editing the BCD
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Init
|
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
sys.path.append(os.getcwd())
|
|
from functions.safemode import *
|
|
init_global_vars()
|
|
os.system('title {}: SafeMode Tool'.format(KIT_NAME_FULL))
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
clear_screen()
|
|
print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL))
|
|
other_results = {
|
|
'Error': {'CalledProcessError': 'Unknown Error'},
|
|
'Warning': {}}
|
|
|
|
if not ask('Disable booting to SafeMode?'):
|
|
abort()
|
|
|
|
# Configure SafeMode
|
|
try_and_print(message='Remove BCD option...',
|
|
function=disable_safemode, other_results=other_results)
|
|
try_and_print(message='Disable MSI in SafeMode...',
|
|
function=disable_safemode_msi, other_results=other_results)
|
|
|
|
# Done
|
|
print_standard('\nDone.')
|
|
pause('Press Enter to reboot...')
|
|
reboot()
|
|
exit_script()
|
|
except SystemExit:
|
|
pass
|
|
except:
|
|
major_exception()
|