## MAJOR refactoring done ##
* All .cmd Command scripts
* Brandind / Settings variables now set via .bin/Scripts/settings/main.py
* Window titles now set using KIT_FULL_NAME
* All .py Python scripts
* All ClientDir paths should now use KIT_SHORT_NAME
* Long lines wrapped to better follow PEP8
* String formatting now more consistant
* Updated run_program() and popen_program() calls to use lists
* (e.g. cmd = ['', '', '']; run_program(cmd))
** Should improve clarity IMO
* Update window titles AFTER init_global_vars() so KIT_FULL_NAME can be used
* Branding / Settings
* Support tech now configurable
* (e.g. "Please let {tech} know and they'll look into it")
* Timezone now configurable
* Upload info can now be disabled/enabled in .bin/Scripts/settings/main.py
* CHKDSK
* Combined read-only and fix scripts and added menu
* DISM
* Combined ScanHealth and RestoreHealth scripts and added menu
* functions/common.py
* BREAKING: run_program() and popen_program() no longer accept 'args' variable
* Misc
* Removed Win7 NVMe launcher
* Never used and Win7 is deprecated
* Removed "DeviceRemover" and "Display Driver Uninstaller" launchers
* Both cut too deep and were not useful
* Removed Nirsoft utilities and Sysinternals Suite launchers
* Too many tools unused.
* Added .url links to the websites in case the tools are needed
* Replaced WinDirStat with TreeSizeFree
* Replaced Q-Dir launcher with XYplorer launcher
* Q-Dir was running into issues on Windows 10
* Removed C.IntRep, ESET, and MBAM launchers from "OSR & VR"
* Removed JRT
* Deprecated and discontinued by MBAM
* Removed unsupported QuickBooks launchers (2014 and older)
* Removed unsupported Office launchers (2010 and 2013\365)
* Removed "Revo Uninstaller" launcher
* Removed infrequently used tools from "Diagnostics"
* Auslogics DiskDefrag
* BatteryInfoView
* BIOSCodes
* GpuTest
* HeavyLoad
* Bugfixes
* major_exception() try-blocks should catch CTL+c again
* Allows for manual script bailing
57 lines
1.7 KiB
Python
57 lines
1.7 KiB
Python
# Wizard Kit: Activate Windows using various methods
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Init
|
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
sys.path.append(os.getcwd())
|
|
from functions.activation import *
|
|
from functions.common import *
|
|
init_global_vars()
|
|
os.system('title {}: Windows Activation Tool'.format(KIT_NAME_FULL))
|
|
|
|
def activate_with_bios():
|
|
"""Attempt to activate Windows with a key stored in the BIOS."""
|
|
try_and_print(message='BIOS Activation:',
|
|
function=activate_windows_with_bios, other_results=other_results)
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
stay_awake()
|
|
# Bail early if already activated
|
|
if windows_is_activated():
|
|
print_info('This system is already activated')
|
|
sleep(5)
|
|
exit_script()
|
|
|
|
# Determine activation method
|
|
activation_methods = [
|
|
{'Name': 'Activate with BIOS key', 'Function': activate_with_bios},
|
|
]
|
|
if global_vars['OS']['Version'] not in ['8', '10']:
|
|
activation_methods[0]['Disabled'] = True
|
|
actions = [
|
|
{'Name': 'Quit', 'Letter': 'Q'},
|
|
]
|
|
|
|
# Main loop
|
|
while True:
|
|
selection = menu_select(
|
|
'{}: Windows Activation Menu'.format(KIT_NAME_FULL),
|
|
activation_methods, actions)
|
|
|
|
if (selection.isnumeric()):
|
|
activation_methods[int(selection)-1]['Function']()
|
|
break
|
|
elif selection == 'Q':
|
|
exit_script()
|
|
|
|
# Done
|
|
print_success('Done.')
|
|
pause("Press Enter to exit...")
|
|
exit_script()
|
|
except SystemExit:
|
|
pass
|
|
except:
|
|
major_exception()
|