Remove unused or outdated scripts
This commit is contained in:
parent
af6119feb5
commit
fed639b674
5 changed files with 0 additions and 254 deletions
|
|
@ -1,81 +0,0 @@
|
|||
# Wizard Kit: Find user wallpaper(s)
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# STATIC VARIABLES
|
||||
EXPLORER_LOCATIONS = [
|
||||
r'{APPDATA}\Microsoft\Internet Explorer\Internet Explorer Wallpaper.bmp',
|
||||
r'{APPDATA}\Microsoft\Windows\Themes\TranscodedWallpaper.jpg',
|
||||
r'{APPDATA}\Mozilla\Firefox\Desktop Background.bmp',
|
||||
]
|
||||
REG_HKCU_LOCATIONS = {
|
||||
r'Control Panel\Desktop': 'Wallpaper',
|
||||
r'Software\Microsoft\Internet Explorer\Desktop\General': 'WallpaperSource',
|
||||
}
|
||||
|
||||
# Init
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
sys.path.append(os.getcwd())
|
||||
from functions.cleanup import *
|
||||
init_global_vars()
|
||||
os.system('title {}: Find user wallpaper(s)'.format(KIT_NAME_FULL))
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
clear_screen()
|
||||
|
||||
# Build list of wallpaper paths
|
||||
wall_paths = [s.format(**global_vars['Env']) for s in EXPLORER_LOCATIONS]
|
||||
for k, v in REG_HKCU_LOCATIONS.items():
|
||||
with winreg.OpenKey(HKCU, k) as key:
|
||||
try:
|
||||
_path = winreg.QueryValueEx(key, v)[0]
|
||||
except Exception:
|
||||
# Meh, ignore
|
||||
pass
|
||||
else:
|
||||
wall_paths.append(_path)
|
||||
|
||||
# Copy files into ClientDir
|
||||
dest_folder = r'{}\{}\Wallpapers'.format(
|
||||
global_vars['BackupDir'],
|
||||
global_vars['Env']['USERNAME'],
|
||||
)
|
||||
os.makedirs(dest_folder, exist_ok=True)
|
||||
for source_path in wall_paths:
|
||||
if os.path.exists(source_path):
|
||||
dest_path = '{}\{}'.format(
|
||||
dest_folder,
|
||||
re.sub(r'^.*\\', '', source_path),
|
||||
)
|
||||
dest_path = non_clobber_rename(dest_path)
|
||||
try:
|
||||
shutil.copy(source_path, dest_path)
|
||||
except Exception:
|
||||
# Meh, ignore
|
||||
pass
|
||||
|
||||
# Open folder if wallpapers were copied or report error
|
||||
delete_empty_folders(dest_folder.replace(r'\Wallpaper', ''))
|
||||
if os.path.exists(dest_folder):
|
||||
popen_program(['explorer', dest_folder])
|
||||
else:
|
||||
print_warning('No wallpapers found.')
|
||||
pause('Press Enter to exit...')
|
||||
|
||||
# TODO: DELETEME
|
||||
print('Wall paths:')
|
||||
for p in wall_paths:
|
||||
print(' ', p)
|
||||
pause('Meh?')
|
||||
|
||||
# Done
|
||||
exit_script()
|
||||
except SystemExit as sys_exit:
|
||||
exit_script(sys_exit.code)
|
||||
except:
|
||||
major_exception()
|
||||
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
# Wizard Kit: Install ESET NOD32 AV
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Init
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
sys.path.append(os.getcwd())
|
||||
from functions.setup import *
|
||||
init_global_vars()
|
||||
os.system('title {}: Install ESET NOD32 AV'.format(KIT_NAME_FULL))
|
||||
set_log_file('Install ESET NOD32 AV.log')
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
clear_screen()
|
||||
print_info('{}: Install ESET NOD32 AV\n'.format(KIT_NAME_FULL))
|
||||
msp = ask('Use MSP settings (ITS/VIP)?')
|
||||
install_eset_nod32_av(msp=msp)
|
||||
print_standard('\nDone.')
|
||||
exit_script()
|
||||
except SystemExit as sys_exit:
|
||||
exit_script(sys_exit.code)
|
||||
except:
|
||||
major_exception()
|
||||
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# Wizard Kit: Network Stability Test
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Init
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
sys.path.append(os.getcwd())
|
||||
from functions.common import *
|
||||
init_global_vars()
|
||||
os.system('title {}: Network Stability Test'.format(KIT_NAME_FULL))
|
||||
|
||||
# STATIC VARIABLES
|
||||
NETWORK_TEST_URL = 'https://testmy.net/auto?extraID=A&schType=&st=1&r_time=0.1666667&xtimes=12&minDFS=&minUFS='
|
||||
YOUTUBE_VID_URL = 'https://youtu.be/z7VYVjR_nwE'
|
||||
PING_URL = 'google.com'
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
clear_screen()
|
||||
print_info('{}: Network Stability Test\n'.format(KIT_NAME_FULL))
|
||||
|
||||
# Open programs
|
||||
print_success('Starting browser tests')
|
||||
popen_program(['start', '', NETWORK_TEST_URL.replace('&', '^&')], shell=True)
|
||||
sleep(1)
|
||||
popen_program(['start', '', YOUTUBE_VID_URL], shell=True)
|
||||
|
||||
# Start pinging
|
||||
try:
|
||||
run_program(['ping', '/t', PING_URL], pipe=False)
|
||||
except KeyboardInterrupt:
|
||||
# Gracefully close on interrupt
|
||||
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()
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
# Wizard Kit: Reset Browsers
|
||||
|
||||
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 {}: Browser Reset Tool'.format(KIT_NAME_FULL))
|
||||
set_log_file('Browser Reset ({USERNAME}).log'.format(**global_vars['Env']))
|
||||
D7_MODE = 'd7mode' in sys.argv
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
stay_awake()
|
||||
clear_screen()
|
||||
print_info('{}: Browser Reset\n'.format(KIT_NAME_FULL))
|
||||
other_results = {
|
||||
'Warning': {
|
||||
'NotInstalledError': 'Not installed',
|
||||
'NoProfilesError': 'No profiles found',
|
||||
}}
|
||||
|
||||
# Bail early
|
||||
if not D7_MODE and not ask('Reset browsers to safe defaults first?'):
|
||||
exit_script()
|
||||
|
||||
# Scan for supported browsers
|
||||
print_info('Scanning for browsers')
|
||||
scan_for_browsers(skip_ie=True)
|
||||
|
||||
# Homepages
|
||||
print_info('Current homepages')
|
||||
list_homepages()
|
||||
|
||||
# Backup
|
||||
print_info('Backing up browsers')
|
||||
backup_browsers()
|
||||
|
||||
# Reset
|
||||
print_info('Resetting browsers')
|
||||
reset_browsers()
|
||||
|
||||
# Done
|
||||
exit_script()
|
||||
except SystemExit as sys_exit:
|
||||
exit_script(sys_exit.code)
|
||||
except:
|
||||
major_exception()
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
#!/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()
|
||||
Loading…
Reference in a new issue