WizardKit - v1.8.4 - Stanley Build
Linux
* HW-Diagnostics
* Reworked osTicket checkbox logic
* There is now a prompt on the results page to update the checkboxes
* If you choose yes it will update the HDD & CPU PASS/FAIL & CPU max temp
* Prime95
* If CPU temps >= 90°C then the test is marked as FAILED
* If CPU temps >= 99°C then the test is halted
* If no sensors are found and the checkboxes are updated, it will use 0°C
* badblocks & I/O Benchmark tests are run in most scenarios now
* SMART Self-Test failure will not block these tests
* SMART C9 / 201 will not block these tests (was seen on several LiteOn SSDs)
* Only critical NVMe/SMART attributes will prevent these tests from running
* Added workaround for the Crucial MX500 series of SSDs
* If this is used it will be shown in the results page and osTicket post
* Failing NVMe/SMART attributes are individually marked for clarity
* Fixed 4K partition alignment check (most boot partitions were being falsely flagged)
* Removed several prompts from the HW-Diagnostic startup
* Removed prompt to upload for review
* ddrescue-TUI (a.k.a WKClone & WKImage)
* Journal output is limited to kernel events
* Avoids a flood of "Updating conky" and "sudo" messages
* Added upload-logs script
* If you see something weird please run this command to upload to Nextcloud
* This script asks why you're uploading the logs
* Added CTRL+ALT shortuts to match the Super shortcuts
* e.g. CTRL+ALT+d to open HW Diagnostics
* Much better input handling - should avoid EOFErrors we've been seeing
* Test-Station names should be included in osTicket posts
* Misc bugfixes
Windows
* Added Windows 10 v1909 support
* d7II
* Added "Starting d7II..." message to launch script
* Windows Updates are enabled during the default selections
* SoftwareDistribution folder is now renamed if it can't be deleted
* Avoids unnecessary crash/reboot
* System Setup
* Renamed modes
* Added Verify option
* This skips all installation steps and optionally skips opening apps
* Classic Start is now installed for all non-HW non-Verify modes
* Google Chrome notifications are disabled by directly editing the Preferences file
* This avoids having Chrome tell you the browser is "Managed by your organization"
* Added a permission fix for Windows\Temp
* Browser backups are no longer compressed
* This should avoid the major slowdowns seen for Chrome profiles
* Reduced the amount of Ninite windows opened in some cases
* Updated ShutUp10 config to avoid breaking Windows Search
* Added prompt to set the default browser/apps
* Updated tools
* Misc bugfixes
|
|
@ -1,5 +1,8 @@
|
|||
# Wizard Kit: Functions - Browsers
|
||||
|
||||
import json
|
||||
import pathlib
|
||||
|
||||
from functions.common import *
|
||||
from operator import itemgetter
|
||||
from settings.browsers import *
|
||||
|
|
@ -58,7 +61,7 @@ def archive_all_users():
|
|||
archive_path += r'\{}.7z'.format(b_k)
|
||||
cmd = [
|
||||
global_vars['Tools']['SevenZip'],
|
||||
'a', '-aoa', '-bso0', '-bse0', '-mx=1',
|
||||
'a', '-aoa', '-bso0', '-bse0', '-mx=0',
|
||||
archive_path, source_items]
|
||||
try_and_print(message='{}...'.format(b_k),
|
||||
function=run_program, cmd=cmd)
|
||||
|
|
@ -74,7 +77,7 @@ def archive_browser(name):
|
|||
os.makedirs(dest, exist_ok=True)
|
||||
cmd = [
|
||||
global_vars['Tools']['SevenZip'],
|
||||
'a', '-aoa', '-bso0', '-bse0', '-mx=1',
|
||||
'a', '-aoa', '-bso0', '-bse0', '-mx=0',
|
||||
'-mhe=on', '-p{}'.format(ARCHIVE_PASSWORD),
|
||||
archive, source]
|
||||
run_program(cmd)
|
||||
|
|
@ -161,6 +164,36 @@ def clean_mozilla_profile(profile):
|
|||
f.write('user_pref("{}", {});\n'.format(k, v))
|
||||
|
||||
|
||||
def disable_chrome_notifications():
|
||||
"""TODO"""
|
||||
# Kill running instances
|
||||
kill_process('chrome.exe')
|
||||
sleep(1)
|
||||
kill_process('chrome.exe')
|
||||
|
||||
# Update browser_data
|
||||
scan_for_browsers(silent=True, skip_ie=True)
|
||||
|
||||
for profile in browser_data.get('Google Chrome', {}).get('profiles', []):
|
||||
pref_file = pathlib.Path(f'{profile["path"]}/Preferences')
|
||||
if pref_file.exists():
|
||||
pref_data = None
|
||||
|
||||
# Read current preferences
|
||||
with open(pref_file, 'r') as f:
|
||||
pref_data = json.loads(f.read())
|
||||
|
||||
# Set notifications blocks
|
||||
defaults_key = 'default_content_setting_values'
|
||||
if defaults_key not in pref_data['profile']:
|
||||
pref_data['profile'][defaults_key] = {}
|
||||
pref_data['profile'][defaults_key]['notifications'] = 2
|
||||
|
||||
# Write new preferences
|
||||
with open(pref_file, 'w') as f:
|
||||
f.write(json.dumps(pref_data, separators=(',', ':')))
|
||||
|
||||
|
||||
def get_browser_details(name):
|
||||
"""Get installation and profile details for all supported browsers."""
|
||||
browser = SUPPORTED_BROWSERS[name].copy()
|
||||
|
|
|
|||
|
|
@ -98,6 +98,24 @@ class WindowsUnsupportedError(Exception):
|
|||
pass
|
||||
|
||||
|
||||
# Backported functions
|
||||
def input_text(prompt):
|
||||
"""Get input and avoid EOFErrors, returns str."""
|
||||
prompt = str(prompt)
|
||||
response = None
|
||||
if prompt[-1:] != ' ':
|
||||
prompt += ' '
|
||||
|
||||
while response is None:
|
||||
try:
|
||||
response = input(prompt)
|
||||
except EOFError:
|
||||
# Ignore and try again
|
||||
print('', flush=True)
|
||||
|
||||
return response
|
||||
|
||||
|
||||
# General functions
|
||||
def abort(show_prompt=True):
|
||||
"""Abort script."""
|
||||
|
|
@ -113,7 +131,7 @@ def ask(prompt='Kotaero!'):
|
|||
answer = None
|
||||
prompt = '{} [Y/N]: '.format(prompt)
|
||||
while answer is None:
|
||||
tmp = input(prompt)
|
||||
tmp = input_text(prompt)
|
||||
if re.search(r'^y(es|)$', tmp, re.IGNORECASE):
|
||||
answer = True
|
||||
elif re.search(r'^n(o|ope|)$', tmp, re.IGNORECASE):
|
||||
|
|
@ -145,7 +163,7 @@ def choice(choices, prompt='Kotaero!'):
|
|||
|
||||
# Get user's choice
|
||||
while answer is None:
|
||||
tmp = input(prompt)
|
||||
tmp = input_text(prompt)
|
||||
if re.search(regex, tmp, re.IGNORECASE):
|
||||
answer = tmp
|
||||
|
||||
|
|
@ -264,7 +282,7 @@ def get_simple_string(prompt='Enter string'):
|
|||
"""Get string from user (restricted character set), returns str."""
|
||||
simple_string = None
|
||||
while simple_string is None:
|
||||
_input = input('{}: '.format(prompt))
|
||||
_input = input_text('{}: '.format(prompt))
|
||||
if re.match(r"^(\w|-| |\.|')+$", _input, re.ASCII):
|
||||
simple_string = _input.strip()
|
||||
return simple_string
|
||||
|
|
@ -276,7 +294,7 @@ def get_ticket_number():
|
|||
return None
|
||||
ticket_number = None
|
||||
while ticket_number is None:
|
||||
_input = input('Enter ticket number: ')
|
||||
_input = input_text('Enter ticket number: ')
|
||||
if re.match(r'^([0-9]+([-_]?\w+|))$', _input):
|
||||
ticket_number = _input
|
||||
out_file = r'{}\TicketNumber'.format(global_vars['LogDir'])
|
||||
|
|
@ -421,7 +439,7 @@ def menu_select(
|
|||
while (answer.upper() not in valid_answers):
|
||||
clear_screen()
|
||||
print(menu_splash)
|
||||
answer = input('{}: '.format(prompt))
|
||||
answer = input_text('{}: '.format(prompt))
|
||||
|
||||
return answer.upper()
|
||||
|
||||
|
|
@ -441,7 +459,7 @@ def pause(prompt='Press Enter to continue... '):
|
|||
"""Simple pause implementation."""
|
||||
if prompt[-1] != ' ':
|
||||
prompt += ' '
|
||||
input(prompt)
|
||||
input_text(prompt)
|
||||
|
||||
|
||||
def ping(addr='google.com'):
|
||||
|
|
|
|||
|
|
@ -1158,7 +1158,7 @@ def run_ddrescue(state, pass_settings):
|
|||
# Show systemd journal output
|
||||
state.panes['Journal'] = tmux_split_window(
|
||||
lines=4, vertical=True,
|
||||
command=['sudo', 'journalctl', '-f'])
|
||||
command=['sudo', 'journalctl', '-f', '-k'])
|
||||
|
||||
# Fix layout
|
||||
state.fix_tmux_panes(forced=True)
|
||||
|
|
@ -1414,7 +1414,7 @@ def select_path(skip_device=None):
|
|||
elif path_options[index]['Name'] == 'Enter manually':
|
||||
# Manual entry
|
||||
while not selected_path:
|
||||
manual_path = input('Please enter path: ').strip()
|
||||
manual_path = input_text('Please enter path: ').strip()
|
||||
if manual_path and pathlib.Path(manual_path).is_dir():
|
||||
selected_path = DirObj(manual_path)
|
||||
elif manual_path and pathlib.Path(manual_path).is_file():
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ TOP_PANE_TEXT = TOP_PANE_TEXT.format(**COLORS)
|
|||
|
||||
# Regex
|
||||
REGEX_ERROR_STATUS = re.compile('|'.join(STATUSES['RED']))
|
||||
REGEX_MX500 = re.compile(r'CT(250|500|1000|2000)MX500SSD(1|4)', re.IGNORECASE)
|
||||
|
||||
|
||||
# Error Classes
|
||||
|
|
@ -39,6 +40,14 @@ class CpuObj():
|
|||
self.name = self.lscpu.get('Model name', 'Unknown CPU')
|
||||
self.description = self.name
|
||||
|
||||
def all_tests_passed(self):
|
||||
"""Check if all tests passed, returns bool."""
|
||||
return self.tests and all([results.passed for results in self.tests.values()])
|
||||
|
||||
def any_test_failed(self):
|
||||
"""Check if any test failed, returns bool."""
|
||||
return self.tests and any([results.failed for results in self.tests.values()])
|
||||
|
||||
def get_details(self):
|
||||
"""Get CPU details from lscpu."""
|
||||
cmd = ['lscpu', '--json']
|
||||
|
|
@ -79,6 +88,7 @@ class CpuObj():
|
|||
class DiskObj():
|
||||
"""Object for tracking disk specific data."""
|
||||
def __init__(self, disk_path):
|
||||
self.attributes = {}
|
||||
self.checkbox = None
|
||||
self.attr_type = 'UNKNOWN'
|
||||
self.disk_ok = True
|
||||
|
|
@ -111,12 +121,27 @@ class DiskObj():
|
|||
self.get_smart_details()
|
||||
self.description = '{size} ({tran}) {model} {serial}'.format(
|
||||
**self.lsblk)
|
||||
self.update_attributes()
|
||||
|
||||
def update_attributes(self):
|
||||
"""HACK to adjust attribute thresholds for Crucial MX500 SSDs."""
|
||||
self.attributes = ATTRIBUTES.copy()
|
||||
if REGEX_MX500.search(self.lsblk['model']):
|
||||
self.attributes['SMART'][197].update({'Warning': 1, 'Error': 2})
|
||||
|
||||
def add_nvme_smart_note(self, note):
|
||||
"""Add note that will be included in the NVMe / SMART report."""
|
||||
# A dict is used to avoid duplicate notes
|
||||
self.nvme_smart_notes[note] = None
|
||||
|
||||
def all_tests_passed(self):
|
||||
"""Check if all tests passed, returns bool."""
|
||||
return self.tests and all([results.passed for results in self.tests.values()])
|
||||
|
||||
def any_test_failed(self):
|
||||
"""Check if any test failed, returns bool."""
|
||||
return self.tests and any([results.failed for results in self.tests.values()])
|
||||
|
||||
def calc_io_dd_values(self):
|
||||
"""Calcualte I/O benchmark dd values.
|
||||
|
||||
|
|
@ -173,8 +198,8 @@ class DiskObj():
|
|||
elif self.smart_attributes:
|
||||
poh = self.smart_attributes.get(9, {}).get('raw', -1)
|
||||
|
||||
error_thresh = ATTRIBUTES['SMART'][9]['Error']
|
||||
max_thresh = ATTRIBUTES['SMART'][9]['Maximum']
|
||||
error_thresh = self.attributes['SMART'][9]['Error']
|
||||
max_thresh = self.attributes['SMART'][9]['Maximum']
|
||||
|
||||
return error_thresh <= poh < max_thresh
|
||||
|
||||
|
|
@ -195,23 +220,23 @@ class DiskObj():
|
|||
elif self.smart_attributes:
|
||||
items = self.smart_attributes.items()
|
||||
for k, v in items:
|
||||
if k in ATTRIBUTES[attr_type]:
|
||||
if not ATTRIBUTES[attr_type][k]['Error']:
|
||||
if k in self.attributes[attr_type]:
|
||||
if not self.attributes[attr_type][k]['Error']:
|
||||
# Informational attribute, skip
|
||||
continue
|
||||
if ATTRIBUTES[attr_type][k]['Ignore']:
|
||||
if self.attributes[attr_type][k]['Ignore']:
|
||||
# Attribute is non-failing, skip
|
||||
continue
|
||||
if v['raw'] >= ATTRIBUTES[attr_type][k]['Error']:
|
||||
if (ATTRIBUTES[attr_type][k]['Maximum']
|
||||
and v['raw'] >= ATTRIBUTES[attr_type][k]['Maximum']):
|
||||
if v['raw'] >= self.attributes[attr_type][k]['Error']:
|
||||
if (self.attributes[attr_type][k]['Maximum']
|
||||
and v['raw'] >= self.attributes[attr_type][k]['Maximum']):
|
||||
# Non-standard value, skip
|
||||
continue
|
||||
else:
|
||||
disk_ok = False
|
||||
|
||||
# Disable override if necessary
|
||||
if ATTRIBUTES[attr_type][k].get('Critical', False):
|
||||
if self.attributes[attr_type][k].get('Critical', False):
|
||||
self.override_disabled = True
|
||||
|
||||
# SMART overall assessment
|
||||
|
|
@ -282,7 +307,7 @@ class DiskObj():
|
|||
attr_type = 'SMART'
|
||||
items = self.smart_attributes.items()
|
||||
for k, v in items:
|
||||
if k in ATTRIBUTES[attr_type]:
|
||||
if k in self.attributes[attr_type]:
|
||||
_note = ''
|
||||
_color = COLORS['GREEN']
|
||||
|
||||
|
|
@ -292,17 +317,23 @@ class DiskObj():
|
|||
else:
|
||||
_line = ' {i:>3} / {h}: {n:28}'.format(
|
||||
i=k,
|
||||
h=ATTRIBUTES[attr_type][k]['Hex'],
|
||||
h=self.attributes[attr_type][k]['Hex'],
|
||||
n=v['name'][:28])
|
||||
|
||||
# Set color
|
||||
for _t, _c in ATTRIBUTE_COLORS:
|
||||
if ATTRIBUTES[attr_type][k][_t]:
|
||||
if v['raw'] >= ATTRIBUTES[attr_type][k][_t]:
|
||||
if self.attributes[attr_type][k][_t]:
|
||||
if v['raw'] >= self.attributes[attr_type][k][_t]:
|
||||
_color = COLORS[_c]
|
||||
if _t == 'Maximum':
|
||||
if _t == 'Error':
|
||||
_note = '(failed)'
|
||||
elif _t == 'Maximum':
|
||||
_note = '(invalid?)'
|
||||
|
||||
# 197/C5 warning
|
||||
if str(k) == '197' and REGEX_MX500.search(self.lsblk['model']):
|
||||
_note = '(MX500 thresholds)'
|
||||
|
||||
# 199/C7 warning
|
||||
if str(k) == '199' and v['raw'] > 0:
|
||||
_note = '(bad cable?)'
|
||||
|
|
@ -456,7 +487,7 @@ class DiskObj():
|
|||
|
||||
# Check partitions
|
||||
for part in json_data.get('partitiontable', {}).get('partitions', []):
|
||||
aligned = aligned and part.get('start', -1) % 4096 == 0
|
||||
aligned = aligned and (part.get('start', -1) * self.lsblk['phy-sec']) % 4096 == 0
|
||||
|
||||
# Done
|
||||
return aligned
|
||||
|
|
@ -465,45 +496,45 @@ class DiskObj():
|
|||
"""Run safety checks and disable tests if necessary."""
|
||||
test_running = False
|
||||
if self.nvme_attributes or self.smart_attributes:
|
||||
disk_ok = self.check_attributes()
|
||||
self.disk_ok = self.check_attributes()
|
||||
test_running = self.check_smart_self_test(silent)
|
||||
|
||||
# Show errors (unless a SMART self-test is running)
|
||||
if not (silent or test_running):
|
||||
if disk_ok:
|
||||
# 199/C7 warning
|
||||
if self.smart_attributes.get(199, {}).get('raw', 0) > 0:
|
||||
print_warning('199/C7 error detected')
|
||||
print_standard(' (Have you tried swapping the disk cable?)')
|
||||
else:
|
||||
# Override?
|
||||
show_report(
|
||||
self.generate_attribute_report(description=True),
|
||||
log_report=True)
|
||||
print_warning(' {} error(s) detected.'.format(self.attr_type))
|
||||
if self.override_disabled:
|
||||
print_standard('Tests disabled for this device')
|
||||
pause()
|
||||
elif not (len(self.tests) == 3 and OVERRIDES_LIMITED):
|
||||
if OVERRIDES_FORCED or ask('Run tests on this device anyway?'):
|
||||
disk_ok = True
|
||||
if 'NVMe / SMART' in self.tests:
|
||||
self.disable_test('NVMe / SMART', 'OVERRIDE')
|
||||
if not self.nvme_attributes and self.smart_attributes:
|
||||
# Re-enable for SMART short-tests
|
||||
self.tests['NVMe / SMART'].disabled = False
|
||||
print_standard(' ')
|
||||
#if not (silent or test_running):
|
||||
# if self.disk_ok:
|
||||
# # 199/C7 warning
|
||||
# if self.smart_attributes.get(199, {}).get('raw', 0) > 0:
|
||||
# print_warning('199/C7 error detected')
|
||||
# print_standard(' (Have you tried swapping the disk cable?)')
|
||||
# else:
|
||||
# # Override?
|
||||
# show_report(
|
||||
# self.generate_attribute_report(description=True),
|
||||
# log_report=True)
|
||||
# print_warning(' {} error(s) detected.'.format(self.attr_type))
|
||||
# if self.override_disabled:
|
||||
# print_standard('Tests disabled for this device')
|
||||
# pause()
|
||||
# elif not (len(self.tests) == 3 and OVERRIDES_LIMITED):
|
||||
# if OVERRIDES_FORCED or ask('Run tests on this device anyway?'):
|
||||
# self.disk_ok = True
|
||||
# if 'NVMe / SMART' in self.tests:
|
||||
# self.disable_test('NVMe / SMART', 'OVERRIDE')
|
||||
# if not self.nvme_attributes and self.smart_attributes:
|
||||
# # Re-enable for SMART short-tests
|
||||
# self.tests['NVMe / SMART'].disabled = False
|
||||
# print_standard(' ')
|
||||
else:
|
||||
# No NVMe/SMART details
|
||||
self.disable_test('NVMe / SMART', 'N/A')
|
||||
if silent:
|
||||
disk_ok = OVERRIDES_FORCED
|
||||
else:
|
||||
show_report(
|
||||
self.generate_attribute_report(description=True),
|
||||
log_report=True)
|
||||
disk_ok = OVERRIDES_FORCED or ask('Run tests on this device anyway?')
|
||||
print_standard(' ')
|
||||
#if silent:
|
||||
# self.disk_ok = OVERRIDES_FORCED
|
||||
#else:
|
||||
# show_report(
|
||||
# self.generate_attribute_report(description=True),
|
||||
# log_report=True)
|
||||
# self.disk_ok = OVERRIDES_FORCED or ask('Run tests on this device anyway?')
|
||||
# print_standard(' ')
|
||||
|
||||
# Disable tests if necessary (statuses won't be overwritten)
|
||||
if test_running:
|
||||
|
|
@ -512,7 +543,8 @@ class DiskObj():
|
|||
self.disable_test('NVMe / SMART', 'Denied')
|
||||
for t in ['badblocks', 'I/O Benchmark']:
|
||||
self.disable_test(t, 'Denied')
|
||||
elif not disk_ok:
|
||||
elif self.override_disabled:
|
||||
# Critical disk error, disable all tests
|
||||
self.disable_test('NVMe / SMART', 'FAIL', test_failed=True)
|
||||
for t in ['badblocks', 'I/O Benchmark']:
|
||||
self.disable_test(t, 'Denied')
|
||||
|
|
@ -1227,11 +1259,9 @@ def run_hw_tests(state):
|
|||
v['Objects'][-1].update_status('N/A')
|
||||
if k == TESTS_CPU[-1]:
|
||||
# Last CPU test run, post CPU results
|
||||
cpu_failed = False
|
||||
for test in state.cpu.tests.values():
|
||||
cpu_failed = cpu_failed or test.failed
|
||||
cpu_failed = cpu_failed or not test.passed
|
||||
color_code = 'Diags FAIL' if cpu_failed else 'Diags'
|
||||
color_code = 'Diags'
|
||||
if state.cpu.any_test_failed():
|
||||
color_code = 'Diags FAIL'
|
||||
state.ost.post_device_results(
|
||||
state.cpu, state.ticket_id, state.ticket_name, color_code)
|
||||
# Recheck attributes
|
||||
|
|
@ -1270,31 +1300,11 @@ def run_hw_tests(state):
|
|||
for disk in state.disks:
|
||||
# Set color code
|
||||
color_code = 'Diags'
|
||||
for test in disk.tests.values():
|
||||
if test.disabled:
|
||||
continue
|
||||
if test.failed or not (test.passed or 'N/A' in test.status):
|
||||
if disk.any_test_failed():
|
||||
color_code = 'Diags FAIL'
|
||||
state.ost.post_device_results(
|
||||
disk, state.ticket_id, state.ticket_name, color_code)
|
||||
|
||||
# Check if disk checkbox needs updating
|
||||
all_disks_passed = True
|
||||
disk_failures = False
|
||||
for disk in state.disks:
|
||||
if disk.checkbox is None:
|
||||
# Aborted/Unknown/etc
|
||||
all_disks_passed = False
|
||||
else:
|
||||
all_disks_passed = all_disks_passed and disk.checkbox
|
||||
disk_failures = disk_failures or not disk.checkbox
|
||||
|
||||
# Update checkbox if necessary
|
||||
if disk_failures:
|
||||
state.ost.set_disk_failed(state.ticket_id)
|
||||
elif all_disks_passed:
|
||||
state.ost.set_disk_passed(state.ticket_id)
|
||||
|
||||
# Spacer
|
||||
print_standard(' ')
|
||||
|
||||
|
|
@ -1303,19 +1313,46 @@ def run_hw_tests(state):
|
|||
print_warning('Errors encountered posting results to osTicket.')
|
||||
print_standard(' ')
|
||||
|
||||
# Upload for review
|
||||
if (ENABLED_UPLOAD_DATA
|
||||
and DEBUG_MODE
|
||||
and ask('Upload results for review?')):
|
||||
try_and_print(
|
||||
message='Saving debug reports...',
|
||||
function=save_debug_reports,
|
||||
state=state, global_vars=global_vars)
|
||||
try_and_print(
|
||||
message='Uploading Data...',
|
||||
function=upload_logdir,
|
||||
global_vars=global_vars,
|
||||
reason='Review')
|
||||
# Do we need to update checkboxes?
|
||||
all_disks_passed = state.disks and all([disk.all_tests_passed() for disk in state.disks])
|
||||
all_disk_tests_enabled = all(
|
||||
[state.tests[name]['Enabled'] for name in TESTS_DISK])
|
||||
any_disk_failures = state.disks and any([disk.any_test_failed() for disk in state.disks])
|
||||
cpu_failed = state.cpu.any_test_failed()
|
||||
cpu_passed = state.cpu.all_tests_passed()
|
||||
update_checkboxes = False
|
||||
if state.ticket_id:
|
||||
if state.tests['Prime95']['Enabled']:
|
||||
update_checkboxes = True
|
||||
elif any_disk_failures:
|
||||
update_checkboxes = True
|
||||
elif all_disk_tests_enabled and all_disks_passed:
|
||||
update_checkboxes = True
|
||||
|
||||
# Ask to update checkboxes
|
||||
if update_checkboxes and ask('Update checkboxes using above results?'):
|
||||
# CPU checkboxes
|
||||
if state.tests['Prime95']['Enabled']:
|
||||
cpu_max_temp = get_cpu_max_temp(state.cpu.tests['Prime95'].sensor_data)
|
||||
cpu_max_temp = f'{cpu_max_temp:2.0f}'
|
||||
if cpu_failed:
|
||||
state.ost.set_cpu_failed(state.ticket_id)
|
||||
elif cpu_passed:
|
||||
state.ost.set_cpu_passed(state.ticket_id)
|
||||
state.ost.set_cpu_max_temp(state.ticket_id, temp=cpu_max_temp)
|
||||
|
||||
# Disk checkboxes
|
||||
if any_disk_failures:
|
||||
state.ost.set_disk_failed(state.ticket_id)
|
||||
elif all_disk_tests_enabled and all_disks_passed:
|
||||
state.ost.set_disk_passed(state.ticket_id)
|
||||
|
||||
# Export debug data
|
||||
try:
|
||||
save_debug_reports(state=state, global_vars=global_vars)
|
||||
except Exception:
|
||||
# WHY?
|
||||
pass
|
||||
|
||||
# Done
|
||||
sleep(1)
|
||||
|
|
@ -1536,6 +1573,11 @@ def run_mprime_test(state, test):
|
|||
print_log('Starting Prime95')
|
||||
test.abort_msg = 'If running too hot, press CTRL+c to abort the test'
|
||||
run_program(['apple-fans', 'max'], check=False)
|
||||
run_program('touch /tmp/prime.status'.split(), check=False)
|
||||
with open('/tmp/prime.status', 'w') as f:
|
||||
f.write(f'{COLORS["YELLOW"]}{test.abort_msg}{COLORS["CLEAR"]}\n')
|
||||
clear_screen()
|
||||
countdown_proc = popen_program('tail -f /tmp/prime.status'.split())
|
||||
tmux_update_pane(
|
||||
state.panes['Prime95'],
|
||||
command=['hw-diags-prime95', global_vars['TmpDir']],
|
||||
|
|
@ -1543,7 +1585,7 @@ def run_mprime_test(state, test):
|
|||
time_limit = MPRIME_LIMIT * 60
|
||||
try:
|
||||
for i in range(time_limit):
|
||||
clear_screen()
|
||||
#clear_screen()
|
||||
sec_left = (time_limit - i) % 60
|
||||
min_left = int( (time_limit - i) / 60)
|
||||
_status_str = 'Running Prime95 ('
|
||||
|
|
@ -1555,8 +1597,10 @@ def run_mprime_test(state, test):
|
|||
sec_left,
|
||||
's' if sec_left != 1 else '')
|
||||
# Not using print wrappers to avoid flooding the log
|
||||
print(_status_str)
|
||||
print('{YELLOW}{msg}{CLEAR}'.format(msg=test.abort_msg, **COLORS))
|
||||
#print(_status_str)
|
||||
#print('{YELLOW}{msg}{CLEAR}'.format(msg=test.abort_msg, **COLORS))
|
||||
with open('/tmp/prime.status', 'a') as f:
|
||||
f.write(f'\r{_status_str}')
|
||||
update_sensor_data(test.sensor_data, THERMAL_LIMIT)
|
||||
|
||||
# Wait
|
||||
|
|
@ -1567,9 +1611,7 @@ def run_mprime_test(state, test):
|
|||
if isinstance(err, KeyboardInterrupt):
|
||||
test.update_status('Aborted')
|
||||
elif isinstance(err, ThermalLimitReachedError):
|
||||
test.failed = True
|
||||
test.thermal_abort = True
|
||||
test.update_status('FAIL')
|
||||
update_progress_pane(state)
|
||||
|
||||
# Restart live monitor
|
||||
|
|
@ -1581,6 +1623,14 @@ def run_mprime_test(state, test):
|
|||
run_program(['killall', '-s', 'INT', 'mprime'], check=False)
|
||||
sleep(1)
|
||||
tmux_kill_pane(state.panes.pop('Prime95', None))
|
||||
countdown_proc.kill()
|
||||
|
||||
# Check max temp
|
||||
cpu_max_temp = get_cpu_max_temp(test.sensor_data)
|
||||
if cpu_max_temp >= THERMAL_FAIL:
|
||||
test.failed = True
|
||||
test.update_status('FAIL')
|
||||
update_progress_pane(state)
|
||||
|
||||
# Get cooldown temp
|
||||
run_program(['apple-fans', 'auto'], check=False)
|
||||
|
|
@ -1679,6 +1729,11 @@ def run_mprime_test(state, test):
|
|||
' {RED}CPU reached temperature limit of {temp}°C{CLEAR}'.format(
|
||||
temp=THERMAL_LIMIT,
|
||||
**COLORS))
|
||||
elif cpu_max_temp >= THERMAL_FAIL:
|
||||
test.report.append(
|
||||
' {RED}CPU reached failing temperature of {temp}°C{CLEAR}'.format(
|
||||
temp=THERMAL_FAIL,
|
||||
**COLORS))
|
||||
|
||||
# Done
|
||||
update_progress_pane(state)
|
||||
|
|
@ -1749,18 +1804,19 @@ def run_nvme_smart_tests(state, test, update_mode=False):
|
|||
# have exceeded the Error threshold. This overrules an override.
|
||||
test.failed = True
|
||||
test.update_status('FAIL')
|
||||
elif dev.is_aging():
|
||||
test.failed = True
|
||||
test.update_status('FAIL')
|
||||
else:
|
||||
# This dev lacks both NVMe and SMART data. This test should've been
|
||||
# disabled during the safety_check().
|
||||
pass
|
||||
|
||||
# Disable other disk tests if necessary
|
||||
if test.failed and not update_mode:
|
||||
if not dev.disk_ok and dev.override_disabled:
|
||||
# Only block other tests if critical attributes have failed
|
||||
for t in ['badblocks', 'I/O Benchmark']:
|
||||
dev.disable_test(t, 'Denied')
|
||||
if dev.is_aging() and not update_mode:
|
||||
test.failed = True
|
||||
test.update_status('FAIL')
|
||||
|
||||
# Done
|
||||
update_progress_pane(state)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
# Wizard Kit: Functions - osTicket
|
||||
|
||||
import atexit
|
||||
import mysql.connector as mariadb
|
||||
|
||||
from functions.data import *
|
||||
|
|
@ -50,7 +51,11 @@ class osTicket():
|
|||
|
||||
# Only open tunnel if one doesn't exist
|
||||
if self.tunnel_proc is None or self.tunnel_proc.poll() is not None:
|
||||
if self.tunnel_proc:
|
||||
# Unregister previous terminate
|
||||
atexit.unregister(self.tunnel_proc.terminate)
|
||||
self.tunnel_proc = popen_program(cmd)
|
||||
atexit.register(self.tunnel_proc.terminate)
|
||||
|
||||
# Connect to database
|
||||
for x in range(5):
|
||||
|
|
@ -434,7 +439,7 @@ class osTicket():
|
|||
# Main loop
|
||||
while ticket_number is None:
|
||||
print_standard(' ')
|
||||
_ticket_id = input('Enter ticket number (or leave blank to disable): ')
|
||||
_ticket_id = input_text('Enter ticket number (or leave blank to disable): ')
|
||||
_ticket_id = _ticket_id.strip()
|
||||
|
||||
# No ticket ID entered
|
||||
|
|
@ -544,6 +549,36 @@ class osTicket():
|
|||
# Done
|
||||
self.disconnect()
|
||||
|
||||
def set_cpu_failed(self, ticket_id):
|
||||
"""Mark cpu as failed in osTicket."""
|
||||
self.set_flag(
|
||||
ticket_id,
|
||||
OSTICKET['CPU Flag']['Name'],
|
||||
OSTICKET['CPU Flag']['Fail'])
|
||||
|
||||
def set_cpu_passed(self, ticket_id):
|
||||
"""Mark cpu as passed in osTicket."""
|
||||
current_value = self.get_flag(ticket_id, OSTICKET['CPU Flag']['Name'])
|
||||
|
||||
# Bail early?
|
||||
if current_value == OSTICKET['CPU Flag']['Fail']:
|
||||
print_warning('Not replacing osTicket cpu checkbox FAILED value')
|
||||
return
|
||||
|
||||
# Current value != FAILED, set to passed
|
||||
self.set_flag(
|
||||
ticket_id,
|
||||
OSTICKET['CPU Flag']['Name'],
|
||||
OSTICKET['CPU Flag']['Pass'])
|
||||
|
||||
def set_cpu_max_temp(self, ticket_id, temp):
|
||||
"""Set CPU temp string in osTicket."""
|
||||
self.set_flag(
|
||||
ticket_id,
|
||||
OSTICKET['CPU Temp']['Name'],
|
||||
temp,
|
||||
)
|
||||
|
||||
def set_disk_failed(self, ticket_id):
|
||||
"""Mark disk as failed in osTicket."""
|
||||
self.set_flag(
|
||||
|
|
@ -598,7 +633,9 @@ def get_hostname():
|
|||
"""Get hostname, returns str."""
|
||||
cmd = ['hostnamectl', '--static']
|
||||
result = run_program(cmd, check=False, encoding='utf-8', errors='ignore')
|
||||
return result.stdout.strip()
|
||||
result = result.stdout.strip()
|
||||
result = result.replace('.1201.com', '')
|
||||
return result
|
||||
|
||||
|
||||
def pad_with_dots(s, pad_right=False):
|
||||
|
|
|
|||
|
|
@ -101,6 +101,22 @@ def get_colored_temp_str(temp):
|
|||
**COLORS)
|
||||
|
||||
|
||||
def get_cpu_max_temp(sensor_data):
|
||||
"""get max temp"""
|
||||
max_temp = 0.0
|
||||
|
||||
# Check all CPU Temps
|
||||
for section, adapters in sensor_data.items():
|
||||
if not section.startswith('CPU'):
|
||||
continue
|
||||
for sources in adapters.values():
|
||||
for source_data in sources.values():
|
||||
max_temp = max(max_temp, source_data.get('Max', 0))
|
||||
|
||||
# Done
|
||||
return max_temp
|
||||
|
||||
|
||||
def get_raw_sensor_data():
|
||||
"""Read sensor data and return dict."""
|
||||
json_data = {}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,13 @@ def config_explorer_user(setup_mode='All'):
|
|||
write_registry_settings(settings_explorer_user, all_users=False)
|
||||
|
||||
|
||||
def config_power_plans(name='Balanced'):
|
||||
"""Meta function to backup, restore defaults, and set the power plan."""
|
||||
backup_power_plans()
|
||||
reset_power_plans()
|
||||
set_power_plan(name)
|
||||
|
||||
|
||||
def config_windows_updates():
|
||||
"""Configure Windows updates."""
|
||||
write_registry_settings(SETTINGS_WINDOWS_UPDATES, all_users=True)
|
||||
|
|
@ -140,6 +147,24 @@ def enable_system_restore():
|
|||
run_program(cmd)
|
||||
|
||||
|
||||
def open_default_apps():
|
||||
"""TODO"""
|
||||
run_program(['start', '', 'ms-settings:defaultapps'], shell=True, check=False)
|
||||
|
||||
|
||||
def reset_power_plans():
|
||||
"""Reset power plans to default settings."""
|
||||
cmd = ['powercfg', '-RestoreDefaultSchemes']
|
||||
run_program(cmd)
|
||||
|
||||
|
||||
def set_power_plan(name='Balanced'):
|
||||
"""Set power plan by name."""
|
||||
guid = POWER_PLAN_GUIDS[name]
|
||||
cmd = ['powercfg', '-SetActive', guid]
|
||||
run_program(cmd)
|
||||
|
||||
|
||||
def update_clock():
|
||||
"""Set Timezone and sync clock."""
|
||||
run_program(['tzutil', '/s', WINDOWS_TIME_ZONE], check=False)
|
||||
|
|
@ -336,13 +361,14 @@ def install_ninite_bundle(
|
|||
|
||||
# Main selections
|
||||
main_selections = []
|
||||
if base:
|
||||
if base and standard:
|
||||
main_selections.append('base-standard')
|
||||
elif base:
|
||||
main_selections.append('base')
|
||||
if standard:
|
||||
if global_vars['OS']['Version'] in ('8', '8.1', '10'):
|
||||
elif standard:
|
||||
main_selections.append('standard')
|
||||
else:
|
||||
main_selections.append('standard7')
|
||||
if global_vars['OS']['Version'] not in ('8', '8.1', '10'):
|
||||
main_selections = [f'{s}7' for s in main_selections]
|
||||
if main_selections:
|
||||
# Only run if base and/or standard are enabled
|
||||
cmd = r'{}\Installers\Extras\Bundles\{}.exe'.format(
|
||||
|
|
@ -437,6 +463,17 @@ def drive_is_rotational(drive):
|
|||
return is_rotational
|
||||
|
||||
|
||||
def fix_windows_temp_dir():
|
||||
"""TODO"""
|
||||
user_perms = [
|
||||
'Users:(CI)(X,WD,AD)',
|
||||
'Administrators:(OI)(CI)(F)',
|
||||
]
|
||||
for u_p in user_perms:
|
||||
cmd = ['icacls', r'C:\Windows\Temp', '/grant:r', u_p, '/T']
|
||||
run_program(cmd)
|
||||
|
||||
|
||||
def open_device_manager():
|
||||
popen_program(['mmc', 'devmgmt.msc'])
|
||||
|
||||
|
|
|
|||
|
|
@ -143,6 +143,8 @@ def tmux_split_window(
|
|||
|
||||
def tmux_switch_client(target_session=None):
|
||||
"""Switch to target tmux session, or previous if none specified."""
|
||||
# DEPRECATED - Do nothing
|
||||
return
|
||||
cmd = ['tmux', 'switch-client']
|
||||
if target_session:
|
||||
cmd.extend(['-t', target_session])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
# Wizard Kit: Functions - Windows updates
|
||||
|
||||
import pathlib
|
||||
|
||||
from functions.common import *
|
||||
|
||||
|
||||
|
|
@ -63,6 +65,10 @@ def disable_windows_updates():
|
|||
indent=indent, width=width,
|
||||
function=delete_folder, folder_path=folder_path)
|
||||
if not result['CS']:
|
||||
try:
|
||||
new_path = pathlib.path(folder_path).with_suffix('.bak')
|
||||
os.rename(folder_path, new_path)
|
||||
except OSError:
|
||||
raise GenericError('Failed to remove folder {}'.format(folder_path))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ function launch_in_tmux() {
|
|||
if [[ -n "${TMUX:-}" ]]; then
|
||||
# Running inside TMUX, switch to session
|
||||
tmux switch-client -t "$SESSION_NAME"
|
||||
if ! jobs %% >/dev/null 2>&1; then
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
# Running outside TMUX, attach to session
|
||||
tmux attach-session -t "$SESSION_NAME"
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ IO_VARS = {
|
|||
ATTRIBUTES = {
|
||||
'NVMe': {
|
||||
'critical_warning': {'Critical': True, 'Ignore': False, 'Warning': None, 'Error': 1, 'Maximum': None, },
|
||||
'media_errors': {'Critical': True, 'Ignore': False, 'Warning': None, 'Error': 1, 'Maximum': None, },
|
||||
'media_errors': {'Critical': False, 'Ignore': False, 'Warning': None, 'Error': 1, 'Maximum': None, },
|
||||
'power_on_hours': {'Critical': False, 'Ignore': True, 'Warning': 17532, 'Error': 26298, 'Maximum': 122724,},
|
||||
'unsafe_shutdowns': {'Critical': False, 'Ignore': True, 'Warning': 1, 'Error': None, 'Maximum': None, },
|
||||
},
|
||||
|
|
@ -104,6 +104,7 @@ KEY_SMART = 'ata_smart_attributes'
|
|||
|
||||
# Tests: Prime95
|
||||
MPRIME_LIMIT = 7 # of minutes to run Prime95
|
||||
THERMAL_FAIL = 90 # Fail temperature in Celsius
|
||||
THERMAL_LIMIT = 99 # Abort temperature in Celsius
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ LAUNCHERS = {
|
|||
r'echo.',
|
||||
r'echo Press Enter to Launch d7II...',
|
||||
r'pause>nul',
|
||||
r'echo.'
|
||||
r'echo Starting d7II...'
|
||||
r'goto DefineLaunch',
|
||||
r'',
|
||||
r':: Pre-d7II Errors',
|
||||
|
|
|
|||
|
|
@ -7,6 +7,14 @@ OSTICKET = {
|
|||
'Diags': '2',
|
||||
'Diags FAIL': '3',
|
||||
},
|
||||
'CPU Flag': {
|
||||
'Name': 'zTemps',
|
||||
'Pass': 1,
|
||||
'Fail': 2,
|
||||
},
|
||||
'CPU Temp': {
|
||||
'Name': 'zMaxTemp',
|
||||
},
|
||||
'Database': {
|
||||
'Name': 'osticket',
|
||||
'User': 'wizardkit',
|
||||
|
|
|
|||
|
|
@ -27,10 +27,6 @@ MOZILLA_FIREFOX_UBO_PATH = r'{}\{}\ublock_origin.xpi'.format(
|
|||
os.environ.get('PROGRAMFILES'),
|
||||
r'Mozilla Firefox\distribution\extensions')
|
||||
SETTINGS_GOOGLE_CHROME = {
|
||||
r'Software\Policies\Google\Chrome': {
|
||||
'DWORD Items': {'DefaultNotificationsSetting': 2},
|
||||
# 1: Allow, 2: Don't allow, 3: Ask
|
||||
},
|
||||
r'Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm': {
|
||||
'SZ Items': {
|
||||
'update_url': 'https://clients2.google.com/service/update2/crx'},
|
||||
|
|
@ -210,6 +206,13 @@ LIBREOFFICE_XCU_DATA = '''<?xml version="1.0" encoding="UTF-8"?>
|
|||
</oor:items>
|
||||
'''
|
||||
|
||||
# Power Plans
|
||||
POWER_PLAN_GUIDS = {
|
||||
'Power': 'a1841308-3541-4fab-bc81-f71556f20b4a',
|
||||
'Balanced': '381b4222-f694-41f0-9685-ff5bb260df2e',
|
||||
'High Performance': '8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c',
|
||||
}
|
||||
|
||||
# Registry
|
||||
SETTINGS_REGBACK = {
|
||||
# Enable RegBack
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
# vim: sts=2 sw=2 ts=2 tw=0
|
||||
|
||||
SOURCE_URLS = {
|
||||
'Adobe Reader DC': 'https://ardownload2.adobe.com/pub/adobe/reader/win/AcrobatDC/1901220034/AcroRdrDC1901220034_en_US.exe',
|
||||
'Adobe Reader DC': 'http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1902120049/AcroRdrDC1902120049_en_US.exe',
|
||||
'AdwCleaner': 'https://downloads.malwarebytes.com/file/adwcleaner',
|
||||
'AIDA64': 'http://download.aida64.com/aida64engineer600.zip',
|
||||
'aria2': 'https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-32bit-build1.zip',
|
||||
'AIDA64': 'http://download.aida64.com/aida64engineer610.zip',
|
||||
'aria2': 'https://github.com/aria2/aria2/releases/download/release-1.35.0/aria2-1.35.0-win-32bit-build1.zip',
|
||||
'Autoruns': 'https://download.sysinternals.com/files/Autoruns.zip',
|
||||
'BleachBit': 'https://download.bleachbit.org/BleachBit-2.2-portable.zip',
|
||||
'BleachBit': 'https://www.bleachbit.org/download/file/t?file=BleachBit-3.0-portable.zip',
|
||||
'BlueScreenView32': 'http://www.nirsoft.net/utils/bluescreenview.zip',
|
||||
'BlueScreenView64': 'http://www.nirsoft.net/utils/bluescreenview-x64.zip',
|
||||
'Caffeine': 'http://www.zhornsoftware.co.uk/caffeine/caffeine.zip',
|
||||
|
|
@ -21,21 +21,21 @@ SOURCE_URLS = {
|
|||
'ESET Online Scanner': 'https://download.eset.com/com/eset/tools/online_scanner/latest/esetonlinescanner_enu.exe',
|
||||
'Everything32': 'https://www.voidtools.com/Everything-1.4.1.935.x86.en-US.zip',
|
||||
'Everything64': 'https://www.voidtools.com/Everything-1.4.1.935.x64.en-US.zip',
|
||||
'FastCopy': 'http://ftp.vector.co.jp/71/78/2323/FastCopy382_installer.exe',
|
||||
'FastCopy': 'http://ftp.vector.co.jp/72/08/2323/FastCopy385_installer.exe',
|
||||
'FurMark': 'https://geeks3d.com/dl/get/569',
|
||||
'Firefox uBO': 'https://addons.mozilla.org/firefox/downloads/file/3027669/ublock_origin-1.20.0-an+fx.xpi',
|
||||
'Firefox uBO': 'https://addons.mozilla.org/firefox/downloads/file/3428595/ublock_origin-1.23.0-an+fx.xpi',
|
||||
'HitmanPro32': 'https://dl.surfright.nl/HitmanPro.exe',
|
||||
'HitmanPro64': 'https://dl.surfright.nl/HitmanPro_x64.exe',
|
||||
'HWiNFO': 'http://files2.majorgeeks.com/8742c668ee52f7cbe5181d609ff800f3a37492c5/systeminfo/hwi_608.zip',
|
||||
'HWiNFO': 'http://files2.majorgeeks.com/e4b5a2b01ee1b51b2d17a165855b43c142d822c4/systeminfo/hwi_614.zip',
|
||||
'Intel SSD Toolbox': r'https://downloadmirror.intel.com/28593/eng/Intel%20SSD%20Toolbox%20-%20v3.5.9.exe',
|
||||
'IOBit_Uninstaller': r'https://portableapps.com/redirect/?a=IObitUninstallerPortable&s=s&d=pa&f=IObitUninstallerPortable_7.5.0.7.paf.exe',
|
||||
'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe',
|
||||
'LibreOffice': 'https://download.documentfoundation.org/libreoffice/stable/6.2.5/win/x86_64/LibreOffice_6.2.5_Win_x64.msi',
|
||||
'LibreOffice': 'https://download.documentfoundation.org/libreoffice/stable/6.3.3/win/x86_64/LibreOffice_6.3.3_Win_x64.msi',
|
||||
'Linux Reader': 'https://www.diskinternals.com/download/Linux_Reader.exe',
|
||||
'Macs Fan Control': 'https://www.crystalidea.com/downloads/macsfancontrol_setup.exe',
|
||||
'NirCmd32': 'https://www.nirsoft.net/utils/nircmd.zip',
|
||||
'NirCmd64': 'https://www.nirsoft.net/utils/nircmd-x64.zip',
|
||||
'NotepadPlusPlus': 'https://notepad-plus-plus.org/repository/7.x/7.7.1/npp.7.7.1.bin.minimalist.7z',
|
||||
'NotepadPlusPlus': 'http://download.notepad-plus-plus.org/repository/7.x/7.8.1/npp.7.8.1.bin.minimalist.7z',
|
||||
'Office Deployment Tool': 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_11617-33601.exe',
|
||||
'ProduKey32': 'http://www.nirsoft.net/utils/produkey.zip',
|
||||
'ProduKey64': 'http://www.nirsoft.net/utils/produkey-x64.zip',
|
||||
|
|
@ -47,12 +47,12 @@ SOURCE_URLS = {
|
|||
'ShutUp10': 'https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe',
|
||||
'smartmontools': 'https://738-105252244-gh.circle-artifacts.com/0/builds/smartmontools-win32-setup-7.1-r4934.exe',
|
||||
'TDSSKiller': 'https://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe',
|
||||
'TestDisk': 'https://www.cgsecurity.org/testdisk-7.1-WIP.win.zip',
|
||||
'TestDisk': 'https://www.cgsecurity.org/testdisk-7.2-WIP.win.zip',
|
||||
'wimlib32': 'https://wimlib.net/downloads/wimlib-1.13.1-windows-i686-bin.zip',
|
||||
'wimlib64': 'https://wimlib.net/downloads/wimlib-1.13.1-windows-x86_64-bin.zip',
|
||||
'WinAIO Repair': 'http://www.tweaking.com/files/setups/tweaking.com_windows_repair_aio.zip',
|
||||
'Winapp2': 'https://github.com/MoscaDotTo/Winapp2/archive/master.zip',
|
||||
'WizTree': 'https://antibody-software.com/files/wiztree_3_29_portable.zip',
|
||||
'WizTree': 'https://antibody-software.com/files/wiztree_3_30_portable.zip',
|
||||
'XMPlay 7z': 'https://support.xmplay.com/files/16/xmp-7z.zip?v=800962',
|
||||
'XMPlay Game': 'https://support.xmplay.com/files/12/xmp-gme.zip?v=515637',
|
||||
'XMPlay RAR': 'https://support.xmplay.com/files/16/xmp-rar.zip?v=409646',
|
||||
|
|
@ -85,10 +85,11 @@ NINITE_REGEX = {
|
|||
}
|
||||
NINITE_SOURCES = {
|
||||
'Bundles': {
|
||||
'base.exe': '.net4.7.2-7zip-vlc',
|
||||
'base-standard.exe': '.net4.7.2-7zip-chrome-classicstart-firefox-sumatrapdf-vlc',
|
||||
'base-standard7.exe': '.net4.7.2-7zip-chrome-firefox-sumatrapdf-vlc',
|
||||
'standard.exe': 'chrome-classicstart-firefox-sumatrapdf',
|
||||
'base.exe': '.net4.8-7zip-classicstart-vlc',
|
||||
'base7.exe': '.net4.8-7zip-vlc',
|
||||
'base-standard.exe': '.net4.8-7zip-chrome-classicstart-firefox-sumatrapdf-vlc',
|
||||
'base-standard7.exe': '.net4.8-7zip-chrome-firefox-sumatrapdf-vlc',
|
||||
'standard.exe': 'chrome-firefox-sumatrapdf',
|
||||
'standard7.exe': 'chrome-firefox-sumatrapdf',
|
||||
},
|
||||
'Audio-Video': {
|
||||
|
|
@ -167,7 +168,7 @@ NINITE_SOURCES = {
|
|||
},
|
||||
'Runtimes': {
|
||||
'Adobe Air.exe': 'air',
|
||||
'dotNET.exe': '.net4.7.2',
|
||||
'dotNET.exe': '.net4.8',
|
||||
'Shockwave.exe': 'shockwave',
|
||||
'Silverlight.exe': 'silverlight',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@ WINDOWS_BUILDS = {
|
|||
'18358': ('10', None, '19H1', None, 'preview build'),
|
||||
'18361': ('10', None, '19H1', None, 'preview build'),
|
||||
'18362': ('10', 'v1903', '19H1', 'May 2019 Update', None),
|
||||
'18363': ('10', 'v1909', '19H2', 'November 2019 Update', None),
|
||||
'18836': ('10', None, '20H1', None, 'preview build'),
|
||||
'18841': ('10', None, '20H1', None, 'preview build'),
|
||||
'18845': ('10', None, '20H1', None, 'preview build'),
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
# Init
|
||||
|
|
@ -47,86 +48,92 @@ OTHER_RESULTS = {
|
|||
SETUP_ACTIONS = OrderedDict({
|
||||
# Install software
|
||||
'Installing Programs': {'Info': True},
|
||||
'VCR': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_vcredists, 'Just run': True,},
|
||||
'ESET NOD32 AV': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_eset_nod32_av, 'If answer': 'ESET', 'KWArgs': {'msp': False},},
|
||||
'LibreOffice': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_libreoffice,
|
||||
'VCR': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_vcredists, 'Just run': True,},
|
||||
'ESET NOD32 AV': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_eset_nod32_av, 'If answer': 'ESET', 'KWArgs': {'msp': False},},
|
||||
'LibreOffice': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_libreoffice,
|
||||
'If answer': 'LibreOffice', 'KWArgs': {'quickstart': False, 'register_mso_types': True, 'use_mso_formats': True, 'vcredist': False},
|
||||
},
|
||||
'Ninite bundle': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_ninite_bundle, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Ninite bundle': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_ninite_bundle, 'KWArgs': {'cs': 'STARTED'},},
|
||||
|
||||
# Browsers
|
||||
'Scanning for browsers': {'Info': True},
|
||||
'Scan': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': scan_for_browsers, 'Just run': True, 'KWArgs': {'skip_ie': True},},
|
||||
'Scan': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': scan_for_browsers, 'Just run': True, 'KWArgs': {'skip_ie': True},},
|
||||
'Backing up browsers': {'Info': True},
|
||||
'Backup browsers': {'New': False, 'Dat': True, 'Cur': True, 'HW': False, 'Function': backup_browsers, 'Just run': True,},
|
||||
'Backup browsers': {'New': False, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': backup_browsers, 'Just run': True,},
|
||||
|
||||
# Install extensions
|
||||
'Installing Extensions': {'Info': True},
|
||||
'Classic Shell skin': {'New': True, 'Dat': True, 'Cur': False, 'HW': False, 'Function': install_classicstart_skin, 'Win10 only': True,},
|
||||
'Chrome extensions': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_chrome_extensions,},
|
||||
'Firefox extensions': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_firefox_extensions,},
|
||||
'Classic Shell skin': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_classicstart_skin, 'Win10 only': True,},
|
||||
'Chrome extensions': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_chrome_extensions,},
|
||||
'Firefox extensions': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_firefox_extensions,},
|
||||
|
||||
# Set Default Apps
|
||||
'Set Default Apps': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': open_default_apps, 'Win10 only': True,
|
||||
'Pause': 'Please set default browser, and other apps as needed',},
|
||||
|
||||
# Configure software'
|
||||
'Configuring Programs': {'Info': True},
|
||||
'Browser add-ons': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_adblock, 'Just run': True,
|
||||
'Browser add-ons': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_adblock, 'Just run': True,
|
||||
'Pause': 'Please enable uBlock Origin for all browsers',
|
||||
},
|
||||
'Classic Start': {'New': True, 'Dat': True, 'Cur': False, 'HW': False, 'Function': config_classicstart, 'Win10 only': True,},
|
||||
'Config Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': config_windows_updates, 'Win10 only': True,},
|
||||
'Enable System Restore': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': enable_system_restore,},
|
||||
'Create System Restore': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': create_system_restore_point,},
|
||||
'Disable Fast Startup': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': disable_fast_startup, 'If answer': 'Fast-Hiber', 'Win10 only': True,},
|
||||
'Disable telemetry': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': disable_windows_telemetry, 'Win10 only': True,},
|
||||
'Enable BSoD mini dumps': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': enable_mini_dumps,},
|
||||
'Enable Hibernation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': enable_hibernation, 'If answer': 'Fast-Hiber', 'Win10 only': True,},
|
||||
'Enable RegBack': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': enable_regback, 'Win10 only': True,},
|
||||
'Enable Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': enable_windows_updates, 'KWArgs': {'silent': True},},
|
||||
'Explorer (system)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': config_explorer_system, 'Win10 only': True,},
|
||||
'Explorer (user)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': config_explorer_user, 'Win10 only': True,},
|
||||
'Restart Explorer': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': restart_explorer,},
|
||||
'Update Clock': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': update_clock,},
|
||||
'Chrome Notifications': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': disable_chrome_notifications,},
|
||||
'Classic Start': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': config_classicstart, 'Win10 only': True,},
|
||||
'Config Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': config_windows_updates, 'Win10 only': True,},
|
||||
'Enable System Restore': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': enable_system_restore,},
|
||||
'Create System Restore': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': create_system_restore_point,},
|
||||
'Disable Fast Startup': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': disable_fast_startup, 'If answer': 'Fast-Hiber', 'Win10 only': True,},
|
||||
'Disable telemetry': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': disable_windows_telemetry, 'Win10 only': True,},
|
||||
'Enable BSoD mini dumps': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': enable_mini_dumps,},
|
||||
'Enable Hibernation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': enable_hibernation, 'If answer': 'Fast-Hiber', 'Win10 only': True,},
|
||||
'Enable RegBack': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': enable_regback, 'Win10 only': True,},
|
||||
'Enable Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': enable_windows_updates, 'KWArgs': {'silent': True},},
|
||||
'Explorer (system)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': config_explorer_system, 'Win10 only': True,},
|
||||
'Explorer (user)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': config_explorer_user, 'Win10 only': True,},
|
||||
'Restart Explorer': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': restart_explorer,},
|
||||
'Power Plans': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': config_power_plans, 'KWArgs': {'name': 'Balanced'},},
|
||||
'Update Clock': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': update_clock,},
|
||||
'Windows\\Temp Fix': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': fix_windows_temp_dir,},
|
||||
|
||||
# Cleanup
|
||||
'Cleaning up': {'Info': True},
|
||||
'AdwCleaner': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': cleanup_adwcleaner,},
|
||||
'd7II': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': cleanup_d7ii,},
|
||||
'Desktop': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': cleanup_desktop,},
|
||||
'Emsisoft s2cmd': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': cleanup_emsisoft,},
|
||||
'Registry Backup(s)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': cleanup_regbackups,},
|
||||
'Restore default UAC': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': restore_default_uac,},
|
||||
'KIT_NAME_FULL': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': delete_empty_folders,},
|
||||
'AdwCleaner': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': cleanup_adwcleaner,},
|
||||
'd7II': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': cleanup_d7ii,},
|
||||
'Desktop': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': cleanup_desktop,},
|
||||
'Emsisoft s2cmd': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': cleanup_emsisoft,},
|
||||
'Registry Backup(s)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': cleanup_regbackups,},
|
||||
'Restore default UAC': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': restore_default_uac,},
|
||||
'KIT_NAME_FULL': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': delete_empty_folders,},
|
||||
|
||||
# System Info
|
||||
'Exporting system info': {'Info': True},
|
||||
'AIDA64 Report': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': run_aida64,},
|
||||
'File listing': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': backup_file_list,},
|
||||
'Power plans': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': backup_power_plans,},
|
||||
'Product Keys': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': run_produkey,},
|
||||
'Registry': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': backup_registry,},
|
||||
'AIDA64 Report': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': run_aida64,},
|
||||
'File listing': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': backup_file_list,},
|
||||
'Product Keys': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': run_produkey,},
|
||||
'Registry': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': backup_registry,},
|
||||
|
||||
# Show Summary
|
||||
'Summary': {'Info': True},
|
||||
'Operating System': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': show_os_name, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
|
||||
'Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': show_os_activation, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
|
||||
'BIOS Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': activate_with_bios, 'If not activated': True,},
|
||||
'Secure Boot': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': check_secure_boot_status, 'KWArgs': {'show_alert': False},},
|
||||
'Installed RAM': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': show_installed_ram, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
|
||||
'Temp size': {'New': False, 'Dat': False, 'Cur': True, 'HW': False, 'Function': show_temp_files_size, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
|
||||
'Show free space': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': show_free_space, 'Just run': True,},
|
||||
'Installed AV': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': get_installed_antivirus, 'KWArgs': {'ns': 'UNKNOWN', 'print_return': True},},
|
||||
'Installed Office': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': get_installed_office, 'KWArgs': {'ns': 'UNKNOWN', 'print_return': True},},
|
||||
'Partitions 4K aligned': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': check_4k_alignment, 'KWArgs': {'cs': 'TRUE', 'ns': 'FALSE'},},
|
||||
'Operating System': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': show_os_name, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
|
||||
'Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': show_os_activation, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
|
||||
'BIOS Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': activate_with_bios, 'If not activated': True,},
|
||||
'Secure Boot': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': check_secure_boot_status, 'KWArgs': {'show_alert': False},},
|
||||
'Installed RAM': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': show_installed_ram, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
|
||||
'Temp size': {'New': False, 'Dat': False, 'Cur': True, 'HW': False, 'Verf': False, 'Function': show_temp_files_size, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
|
||||
'Show free space': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': show_free_space, 'Just run': True,},
|
||||
'Installed AV': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': get_installed_antivirus, 'KWArgs': {'ns': 'UNKNOWN', 'print_return': True},},
|
||||
'Installed Office': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': get_installed_office, 'KWArgs': {'ns': 'UNKNOWN', 'print_return': True},},
|
||||
'Partitions 4K aligned': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': check_4k_alignment, 'KWArgs': {'cs': 'TRUE', 'ns': 'FALSE'},},
|
||||
|
||||
# Open things
|
||||
'Opening Programs': {'Info': True},
|
||||
'Device Manager': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': open_device_manager, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'HWiNFO sensors': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': run_hwinfo_sensors, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Snappy': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': open_snappy_driver_origin, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Speed test': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': open_speedtest, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': open_windows_updates, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Windows Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': open_windows_activation, 'If not activated': True, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Sleep': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': sleep, 'Just run': True, 'KWArgs': {'seconds': 3},},
|
||||
'XMPlay': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': run_xmplay, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Device Manager': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': open_device_manager, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'HWiNFO sensors': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': run_hwinfo_sensors, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Snappy': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': open_snappy_driver_origin, 'KWArgs': {'cs': 'STARTED'},},
|
||||
#'Speed test': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': open_speedtest, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': open_windows_updates, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Windows Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': open_windows_activation, 'If not activated': True, 'KWArgs': {'cs': 'STARTED'},},
|
||||
'Sleep': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': sleep, 'Just run': True, 'KWArgs': {'seconds': 3},},
|
||||
'XMPlay': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': run_xmplay, 'KWArgs': {'cs': 'STARTED'},},
|
||||
})
|
||||
SETUP_ACTION_KEYS = (
|
||||
'Function',
|
||||
|
|
@ -287,10 +294,11 @@ def get_mode():
|
|||
"""Get mode via menu_select, returns str."""
|
||||
setup_mode = None
|
||||
mode_options = [
|
||||
{'Name': 'New', 'Display Name': 'New / Clean install (no data)'},
|
||||
{'Name': 'Dat', 'Display Name': 'Clean install with data migration'},
|
||||
{'Name': 'Cur', 'Display Name': 'Original OS (post-d7II or overinstall)'},
|
||||
{'Name': 'HW', 'Display Name': 'Hardware service (i.e. no software work)'},
|
||||
{'Name': 'New', 'Display Name': 'Clean install (no data)'},
|
||||
{'Name': 'Dat', 'Display Name': 'Clean install (with data)'},
|
||||
{'Name': 'Cur', 'Display Name': 'Original OS (post-repairs)'},
|
||||
{'Name': 'HW', 'Display Name': 'Hardware service'},
|
||||
{'Name': 'Verf', 'Display Name': 'Verify (no changes)'},
|
||||
]
|
||||
actions = [
|
||||
{'Name': 'Quit', 'Letter': 'Q'},
|
||||
|
|
@ -381,10 +389,47 @@ def main():
|
|||
# Ignoring exceptions since we just want to show the popup
|
||||
pass
|
||||
|
||||
# Eject ODD
|
||||
try:
|
||||
run_nircmd('cdrom', 'open')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Verf step
|
||||
if setup_mode == 'Verf' and ask('Open programs (Activation, Device Manager, etc...)? '):
|
||||
open_all_the_things()
|
||||
|
||||
# Done
|
||||
pause('Press Enter to exit... ')
|
||||
|
||||
|
||||
def open_all_the_things():
|
||||
"""TODO"""
|
||||
open_device_manager()
|
||||
run_hwinfo_sensors()
|
||||
open_snappy_driver_origin()
|
||||
open_speedtest()
|
||||
open_windows_updates()
|
||||
if not windows_is_activated():
|
||||
open_windows_activation()
|
||||
sleep(3)
|
||||
run_xmplay()
|
||||
if setup_mode == 'Dat':
|
||||
# System needs full AV scan
|
||||
print_standard('Please run a full virus scan before continuing')
|
||||
eset_path = pathlib.Path(
|
||||
f'{os.environ.get("PROGRAMFILES", "")}/ESET/ESET Security/ecmds.exe')
|
||||
if eset_path.exists():
|
||||
popen_program([eset_path, '/launch'])
|
||||
else:
|
||||
try:
|
||||
run_kvrt()
|
||||
except Exception:
|
||||
# Meh
|
||||
pass
|
||||
pause('Press Enter to exit...')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
main()
|
||||
|
|
|
|||
48
.bin/Scripts/upload-logs
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/env python
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
"""Wizard Kit: Upload Logs"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Init
|
||||
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
|
||||
from functions.hw_diags import *
|
||||
init_global_vars(silent=True)
|
||||
|
||||
|
||||
# Functions
|
||||
def main():
|
||||
"""Upload logs for review."""
|
||||
lines = []
|
||||
|
||||
# Instructions
|
||||
print_success(f'{KIT_NAME_FULL}: Upload Logs')
|
||||
print('')
|
||||
print('Please state the reason for the review.')
|
||||
print_info(' End note with an empty line.')
|
||||
print('')
|
||||
|
||||
# Get reason note
|
||||
while True:
|
||||
text = input_text('> ')
|
||||
if not text:
|
||||
break
|
||||
lines.append(text)
|
||||
with open(f'{global_vars["LogDir"]}/__reason__.txt', 'a') as f:
|
||||
f.write('\n'.join(lines))
|
||||
|
||||
# Compress and upload logs
|
||||
result = try_and_print(
|
||||
message='Uploading logs...',
|
||||
function=upload_logdir,
|
||||
indent=0,
|
||||
global_vars=global_vars,
|
||||
reason='Review',
|
||||
)
|
||||
if not result['CS']:
|
||||
raise SystemExit(1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
@ -24,6 +24,7 @@ set iso_date=%_yyyy%-%_mm%-%_dd%
|
|||
|
||||
rem Get uninstaller path from registry
|
||||
set "uninstaller="
|
||||
set "altuninstaller=%PROGRAMFILES%\Malwarebytes\Anti-Malware\mbuns.exe"
|
||||
for /f usebackq^ tokens^=2^ delims^=^" %%s in (
|
||||
`reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{35065F43-4BB2-439A-BFF7-0F1014F2E0CD}_is1" /v UninstallString`
|
||||
) do (
|
||||
|
|
@ -47,17 +48,24 @@ if exist "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" (
|
|||
if exist "%uninstaller%" (
|
||||
echo "Uninstalling Malwarebytes..."
|
||||
start "" /wait "%uninstaller%" /VERYSILENT /NORESTART /LOG
|
||||
) else (
|
||||
goto Done
|
||||
)
|
||||
if exist "%altuninstaller%" (
|
||||
rem MBAM 4.x workaround
|
||||
echo "Uninstalling Malwarebytes..."
|
||||
start "" /wait "%altuninstaller%" /Uninstall /VERYSILENT /NORESTART /LOG
|
||||
goto Done
|
||||
)
|
||||
color 4e
|
||||
echo "Malwarebytes installation not found."
|
||||
echo ""
|
||||
echo "Press any key to exit... "
|
||||
pause >nul
|
||||
)
|
||||
)
|
||||
|
||||
:Done
|
||||
rem Remove marker
|
||||
del /f "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker"
|
||||
del /f "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" 2>nul
|
||||
|
||||
popd
|
||||
endlocal
|
||||
|
|
@ -832,6 +832,7 @@ WizardKit User Checklist=1
|
|||
WizardKit System Checklist=1
|
||||
WizardKit Browser Reset=0
|
||||
Malwarebytes Download=1
|
||||
Enable Windows Updates=1
|
||||
[Repair2]
|
||||
49=0
|
||||
48=0
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Malwarebytes Download|Malwarebytes Install|Malwarebytes Scan|Malwarebytes Uninstall|AdwCleaner (Updated)|IObit Uninstaller|Bitdefender Rootkit Remover|
|
||||
Malwarebytes Download|Malwarebytes Install|Malwarebytes Scan|Malwarebytes Uninstall|AdwCleaner (Updated)|IObit Uninstaller|Enable Windows Updates|Bitdefender Rootkit Remover|
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# get any feedback about the import.
|
||||
#
|
||||
# We are always happy to answer any questions you may have!
|
||||
# (c) 2015-2018 O&O Software GmbH, Berlin. https://www.oo-software.com/
|
||||
# Copyright © O&O Software GmbH https://www.oo-software.com/
|
||||
############################################################################
|
||||
|
||||
P001 +
|
||||
|
|
@ -58,7 +58,10 @@ S010 -
|
|||
E001 +
|
||||
E002 -
|
||||
E003 -
|
||||
E008 -
|
||||
E007 -
|
||||
E010 -
|
||||
E009 -
|
||||
E004 -
|
||||
E005 -
|
||||
E006 -
|
||||
|
|
@ -113,12 +116,15 @@ S014 +
|
|||
S011 -
|
||||
K001 -
|
||||
K002 +
|
||||
K005 -
|
||||
M001 +
|
||||
M002 +
|
||||
M003 +
|
||||
M004 +
|
||||
M005 +
|
||||
M003 -
|
||||
M012 -
|
||||
M013 -
|
||||
M014 -
|
||||
M015 +
|
||||
M016 -
|
||||
N001 -
|
||||
|
|
|
|||
|
|
@ -1 +1,7 @@
|
|||
ServerAliveInterval 120
|
||||
|
||||
Host *
|
||||
LogLevel=quiet
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile=/dev/null
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
osticket.1201.com,165.227.31.131 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJDDXtNvh4Vd3q3qZkZbIcnDWWOfJPZb6LVCFptr4awYjlZNL5ieWIUW080IUgtnzWNR7UvetQRtGDsyGu65L+4=
|
||||
|
|
@ -9,6 +9,8 @@
|
|||
#
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $alt Mod1
|
||||
set $ctrl Control
|
||||
set $mod Mod4
|
||||
|
||||
# Configure border style <normal|1pixel|pixel xx|none|pixel>
|
||||
|
|
@ -24,8 +26,8 @@ bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 5%- #decreas
|
|||
bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle # mute sound
|
||||
|
||||
# alt+tab navi
|
||||
bindsym Mod1+Tab workspace next
|
||||
bindsym Mod1+Shift+Tab workspace prev
|
||||
bindsym $alt+Tab workspace next
|
||||
bindsym $alt+Shift+Tab workspace prev
|
||||
|
||||
# change borders
|
||||
bindsym $mod+u border none
|
||||
|
|
@ -57,7 +59,7 @@ bindsym $mod+Return exec i3-sensible-terminal
|
|||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
bindsym $mod+q kill
|
||||
bindsym Mod1+F4 kill
|
||||
bindsym $alt+F4 kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
#bindsym $mod+Shift+d exec dmenu_run
|
||||
|
|
@ -66,8 +68,18 @@ bindsym Mod1+F4 kill
|
|||
# installed.
|
||||
#bindsym $mod+Shift+d exec --no-startup-id i3-dmenu-desktop
|
||||
bindsym $mod+r exec "rofi -combi-modi window,drun,run -show combi -modi combi"
|
||||
bindsym $ctrl+$alt+r exec "rofi -combi-modi window,drun,run -show combi -modi combi"
|
||||
|
||||
# misc app shortcuts
|
||||
bindsym $ctrl+$alt+c exec "urxvt -title 'WKClone (ddrescue-tui)' -e ddrescue-tui clone"
|
||||
bindsym $ctrl+$alt+d exec "urxvt -title 'Hardware Diagnostics' -e hw-diags"
|
||||
bindsym $ctrl+$alt+f exec "thunar ~"
|
||||
bindsym $ctrl+$alt+i exec "hardinfo"
|
||||
bindsym $ctrl+$alt+m exec "urxvt -title 'Mount All Volumes' -e mount-all-volumes gui"
|
||||
bindsym $ctrl+$alt+s exec "urxvt -title 'Hardware Diagnostics' -e hw-diags --quick"
|
||||
bindsym $ctrl+$alt+t exec "urxvt"
|
||||
bindsym $ctrl+$alt+v exec "urxvt -title 'Hardware Sensors' -e watch -c -n1 -t hw-sensors"
|
||||
bindsym $ctrl+$alt+w exec "firefox"
|
||||
bindsym $mod+c exec "urxvt -title 'WKClone (ddrescue-tui)' -e ddrescue-tui clone"
|
||||
bindsym $mod+d exec "urxvt -title 'Hardware Diagnostics' -e hw-diags"
|
||||
bindsym $mod+f exec "thunar ~"
|
||||
|
|
@ -240,6 +252,7 @@ mode "resize" {
|
|||
bindsym $mod+Shift+r mode "resize"
|
||||
|
||||
# "System" menu
|
||||
bindsym $ctrl+$alt+x mode "$mode_system"
|
||||
bindsym $mod+x mode "$mode_system"
|
||||
set $mode_system (l)ock, (e)xit, (r)eboot, (s)hutdown, (c)onfig, (i)3
|
||||
mode "$mode_system" {
|
||||
|
|
|
|||
|
|
@ -297,6 +297,61 @@
|
|||
<menu>root-menu</menu>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-c">
|
||||
<action name="Execute">
|
||||
<command>urxvt -title "WKClone (ddrescue-tui)" -e ddrescue-tui clone</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-d">
|
||||
<action name="Execute">
|
||||
<command>urxvt -title "Hardware Diagnostics" -e hw-diags</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-f">
|
||||
<action name="Execute">
|
||||
<command>thunar</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-i">
|
||||
<action name="Execute">
|
||||
<command>hardinfo</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-m">
|
||||
<action name="Execute">
|
||||
<command>urxvt -title "Mount all Volumes" -e mount-all-volumes gui</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-r">
|
||||
<action name="Execute">
|
||||
<command>rofi -combi-modi window,drun,run -show combi -modi combi</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-s">
|
||||
<action name="Execute">
|
||||
<command>urxvt -title "Hardware Diagnostics" -e hw-diags --quick</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-t">
|
||||
<action name="Execute">
|
||||
<command>urxvt</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-v">
|
||||
<action name="Execute">
|
||||
<command>urxvt -title "Hardware Sensors" -e watch -c -n1 -t hw-sensors</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-w">
|
||||
<action name="Execute">
|
||||
<command>firefox</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-x">
|
||||
<action name="Execute">
|
||||
<command>oblogout</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-c">
|
||||
<action name="Execute">
|
||||
<command>urxvt -title "WKClone (ddrescue-tui)" -e ddrescue-tui clone</command>
|
||||
|
|
|
|||
|
|
@ -9,28 +9,39 @@ chntpw
|
|||
cmatrix
|
||||
colordiff
|
||||
cpio
|
||||
cryptsetup
|
||||
curl
|
||||
device-mapper
|
||||
diffutils
|
||||
dmidecode
|
||||
dos2unix
|
||||
e2fsprogs
|
||||
hexedit
|
||||
hfsprogs
|
||||
htop
|
||||
inetutils
|
||||
iwd
|
||||
jfsutils
|
||||
ldmtool
|
||||
ldns
|
||||
less
|
||||
lha
|
||||
libewf
|
||||
linux-firmware
|
||||
lm_sensors
|
||||
lvm2
|
||||
lzip
|
||||
man-db
|
||||
man-pages
|
||||
mariadb-clients
|
||||
mdadm
|
||||
mediainfo
|
||||
mprime
|
||||
nano
|
||||
ncdu
|
||||
networkmanager
|
||||
p7zip
|
||||
perl
|
||||
progsreiserfs
|
||||
python
|
||||
python-docopt
|
||||
|
|
@ -44,9 +55,13 @@ rfkill
|
|||
rng-tools
|
||||
rxvt-unicode-terminfo
|
||||
smartmontools-svn
|
||||
smbclient
|
||||
speedtest-cli
|
||||
sysfsutils
|
||||
systemd-sysvcompat
|
||||
terminus-font
|
||||
testdisk-wip
|
||||
texinfo
|
||||
tmux
|
||||
tree
|
||||
udevil
|
||||
|
|
@ -55,9 +70,14 @@ ufw
|
|||
unarj
|
||||
unrar
|
||||
unzip
|
||||
usbutils
|
||||
util-linux
|
||||
vi
|
||||
vim
|
||||
wd719x-firmware
|
||||
which
|
||||
wimlib
|
||||
xfsprogs
|
||||
xz
|
||||
zip
|
||||
zsh
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 345 KiB |
BIN
Images/Linux.jpg
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 343 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 305 KiB |
BIN
Images/WinPE.jpg
|
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 180 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |