2016-12: Retroactive Updates
* Removed SIV and switched back to AIDA64 * Bugfixes
This commit is contained in:
parent
7616f2ea5f
commit
1822b7e9bf
11 changed files with 304 additions and 159 deletions
|
|
@ -920,6 +920,8 @@ def upload_data(path=None, file=None, vars_wk=None):
|
||||||
with open('{TmpDir}\\psftp.batch'.format(**vars_wk), 'w', encoding='ascii') as f:
|
with open('{TmpDir}\\psftp.batch'.format(**vars_wk), 'w', encoding='ascii') as f:
|
||||||
f.write('lcd "{path}"\n'.format(path=path))
|
f.write('lcd "{path}"\n'.format(path=path))
|
||||||
f.write('cd "{Share}"\n'.format(**CLIENT_INFO_SERVER))
|
f.write('cd "{Share}"\n'.format(**CLIENT_INFO_SERVER))
|
||||||
|
f.write('mkdir {ProduKey}'.format(**vars_wk))
|
||||||
|
f.write('cd {ProduKey}'.format(**vars_wk))
|
||||||
f.write('put "{file}"\n'.format(file=file))
|
f.write('put "{file}"\n'.format(file=file))
|
||||||
|
|
||||||
# Upload Info
|
# Upload Info
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ def clean_internet_explorer():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def exit_script():
|
def exit_script():
|
||||||
# pause("Press Enter to exit...")
|
pause("Press Enter to exit...")
|
||||||
quit()
|
quit()
|
||||||
|
|
||||||
def get_chrome_exe():
|
def get_chrome_exe():
|
||||||
|
|
@ -210,10 +210,13 @@ def get_chrome_exe():
|
||||||
def get_chrome_profiles():
|
def get_chrome_profiles():
|
||||||
"""Find any existing Chrome profiles and return as a list of os.DirEntry objects."""
|
"""Find any existing Chrome profiles and return as a list of os.DirEntry objects."""
|
||||||
profiles = []
|
profiles = []
|
||||||
for entry in os.scandir('{LOCALAPPDATA}\\Google\\Chrome\\User Data'.format(**vars_wk['Env'])):
|
try:
|
||||||
if entry.is_dir() and re.search(r'^(Default|Profile)', entry.name, re.IGNORECASE):
|
for entry in os.scandir('{LOCALAPPDATA}\\Google\\Chrome\\User Data'.format(**vars_wk['Env'])):
|
||||||
profiles.append(entry)
|
if entry.is_dir() and re.search(r'^(Default|Profile)', entry.name, re.IGNORECASE):
|
||||||
profiles = [p for p in profiles if not re.search(r'\.(wk|)bak.*', p.name, re.IGNORECASE)]
|
profiles.append(entry)
|
||||||
|
profiles = [p for p in profiles if not re.search(r'\.(wk|)bak.*', p.name, re.IGNORECASE)]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
return profiles
|
return profiles
|
||||||
|
|
||||||
|
|
@ -223,16 +226,18 @@ def get_chrome_canary_exe():
|
||||||
if os.path.exists(prog_exe):
|
if os.path.exists(prog_exe):
|
||||||
return prog_exe
|
return prog_exe
|
||||||
else:
|
else:
|
||||||
print_error(' ERROR: chrome.exe not found. Please verify installation.', vars_wk['LogFile'])
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_chrome_canary_profiles():
|
def get_chrome_canary_profiles():
|
||||||
"""Find any existing Chrome profiles and return as a list of os.DirEntry objects."""
|
"""Find any existing Chrome profiles and return as a list of os.DirEntry objects."""
|
||||||
profiles = []
|
profiles = []
|
||||||
for entry in os.scandir('{LOCALAPPDATA}\\Google\\Chrome SxS\\User Data'.format(**vars_wk['Env'])):
|
try:
|
||||||
if entry.is_dir() and re.search(r'^(Default|Profile)', entry.name, re.IGNORECASE):
|
for entry in os.scandir('{LOCALAPPDATA}\\Google\\Chrome SxS\\User Data'.format(**vars_wk['Env'])):
|
||||||
profiles.append(entry)
|
if entry.is_dir() and re.search(r'^(Default|Profile)', entry.name, re.IGNORECASE):
|
||||||
profiles = [p for p in profiles if not re.search(r'\.(wk|)bak.*', p.name, re.IGNORECASE)]
|
profiles.append(entry)
|
||||||
|
profiles = [p for p in profiles if not re.search(r'\.(wk|)bak.*', p.name, re.IGNORECASE)]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
return profiles
|
return profiles
|
||||||
|
|
||||||
|
|
@ -276,10 +281,13 @@ def get_opera_exe():
|
||||||
def get_firefox_profiles():
|
def get_firefox_profiles():
|
||||||
"""Find any existing Chrome profiles and return as a list of os.DirEntry objects."""
|
"""Find any existing Chrome profiles and return as a list of os.DirEntry objects."""
|
||||||
profiles = []
|
profiles = []
|
||||||
for entry in os.scandir('{APPDATA}\\Mozilla\\Firefox\\Profiles'.format(**vars_wk['Env'])):
|
try:
|
||||||
if entry.is_dir():
|
for entry in os.scandir('{APPDATA}\\Mozilla\\Firefox\\Profiles'.format(**vars_wk['Env'])):
|
||||||
profiles.append(entry)
|
if entry.is_dir():
|
||||||
profiles = [p for p in profiles if not re.search(r'\.(wk|)bak.*', p.name, re.IGNORECASE)]
|
profiles.append(entry)
|
||||||
|
profiles = [p for p in profiles if not re.search(r'\.(wk|)bak.*', p.name, re.IGNORECASE)]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
return profiles
|
return profiles
|
||||||
|
|
||||||
|
|
@ -323,27 +331,36 @@ def get_opera_dev_exe():
|
||||||
def get_opera_profile():
|
def get_opera_profile():
|
||||||
"""Find an existing Opera profile and return as a length-1 list of os.DirEntry objects."""
|
"""Find an existing Opera profile and return as a length-1 list of os.DirEntry objects."""
|
||||||
profiles = []
|
profiles = []
|
||||||
for entry in os.scandir('{APPDATA}\\Opera Software'.format(**vars_wk['Env'])):
|
try:
|
||||||
if entry.is_dir() and entry.name == 'Opera Stable':
|
for entry in os.scandir('{APPDATA}\\Opera Software'.format(**vars_wk['Env'])):
|
||||||
return [entry]
|
if entry.is_dir() and entry.name == 'Opera Stable':
|
||||||
|
return [entry]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
return profiles
|
return profiles
|
||||||
|
|
||||||
def get_opera_beta_profile():
|
def get_opera_beta_profile():
|
||||||
"""Find an existing Opera Beta profile and return as a length-1 list of os.DirEntry objects."""
|
"""Find an existing Opera Beta profile and return as a length-1 list of os.DirEntry objects."""
|
||||||
profiles = []
|
profiles = []
|
||||||
for entry in os.scandir('{APPDATA}\\Opera Software'.format(**vars_wk['Env'])):
|
try:
|
||||||
if entry.is_dir() and entry.name == 'Opera Next':
|
for entry in os.scandir('{APPDATA}\\Opera Software'.format(**vars_wk['Env'])):
|
||||||
return [entry]
|
if entry.is_dir() and entry.name == 'Opera Next':
|
||||||
|
return [entry]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
return profiles
|
return profiles
|
||||||
|
|
||||||
def get_opera_dev_profile():
|
def get_opera_dev_profile():
|
||||||
"""Find an existing Opera Dev profile and return as a length-1 list of os.DirEntry objects."""
|
"""Find an existing Opera Dev profile and return as a length-1 list of os.DirEntry objects."""
|
||||||
profiles = []
|
profiles = []
|
||||||
for entry in os.scandir('{APPDATA}\\Opera Software'.format(**vars_wk['Env'])):
|
try:
|
||||||
if entry.is_dir() and entry.name == 'Opera Developer':
|
for entry in os.scandir('{APPDATA}\\Opera Software'.format(**vars_wk['Env'])):
|
||||||
return [entry]
|
if entry.is_dir() and entry.name == 'Opera Developer':
|
||||||
|
return [entry]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
return profiles
|
return profiles
|
||||||
|
|
||||||
|
|
@ -480,14 +497,15 @@ def reset_mozilla_firefox():
|
||||||
run_program(firefox_dev_exe, ['https://addons.mozilla.org/en-us/firefox/addon/ublock-origin/'], check=False)
|
run_program(firefox_dev_exe, ['https://addons.mozilla.org/en-us/firefox/addon/ublock-origin/'], check=False)
|
||||||
|
|
||||||
def reset_opera():
|
def reset_opera():
|
||||||
print_standard(' Opera', vars_wk['LogFile'])
|
|
||||||
opera_exe = get_opera_exe()
|
opera_exe = get_opera_exe()
|
||||||
profiles = get_opera_profile()
|
profiles = get_opera_profile()
|
||||||
|
|
||||||
# Bail early
|
# Bail early
|
||||||
if opera_exe is None and len(profiles) == 0:
|
if opera_exe is None and len(profiles) == 0:
|
||||||
print_warning(' Opera not installed and no profiles found.')
|
# print_warning(' Opera not installed and no profiles found.')
|
||||||
return
|
return
|
||||||
|
else:
|
||||||
|
print_standard(' Opera', vars_wk['LogFile'])
|
||||||
|
|
||||||
if opera_exe is None:
|
if opera_exe is None:
|
||||||
print_error(' ERROR: Opera not installed.', vars_wk['LogFile'])
|
print_error(' ERROR: Opera not installed.', vars_wk['LogFile'])
|
||||||
|
|
@ -512,7 +530,7 @@ def reset_opera_beta():
|
||||||
|
|
||||||
# Bail early
|
# Bail early
|
||||||
if opera_beta_exe is None and len(profiles) == 0:
|
if opera_beta_exe is None and len(profiles) == 0:
|
||||||
print_error(' Opera Beta not installed and no profiles found.')
|
# print_error(' Opera Beta not installed and no profiles found.')
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
print_standard(' Opera Beta', vars_wk['LogFile'])
|
print_standard(' Opera Beta', vars_wk['LogFile'])
|
||||||
|
|
@ -540,7 +558,7 @@ def reset_opera_dev():
|
||||||
|
|
||||||
# Bail early
|
# Bail early
|
||||||
if opera_dev_exe is None and len(profiles) == 0:
|
if opera_dev_exe is None and len(profiles) == 0:
|
||||||
print_error(' Opera Dev not installed and no profiles found.')
|
# print_error(' Opera Dev not installed and no profiles found.')
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
print_standard(' Opera Dev', vars_wk['LogFile'])
|
print_standard(' Opera Dev', vars_wk['LogFile'])
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,13 @@ vars_wk = init_vars_wk()
|
||||||
vars_wk.update(init_vars_os())
|
vars_wk.update(init_vars_os())
|
||||||
vars_wk['BackupDir'] = '{ClientDir}\\Backups\\{Date}'.format(**vars_wk)
|
vars_wk['BackupDir'] = '{ClientDir}\\Backups\\{Date}'.format(**vars_wk)
|
||||||
vars_wk['LogFile'] = '{LogDir}\\Software Checklist.log'.format(**vars_wk)
|
vars_wk['LogFile'] = '{LogDir}\\Software Checklist.log'.format(**vars_wk)
|
||||||
|
vars_wk['AIDA64'] = '{BinDir}\\AIDA64\\aida64.exe'.format(**vars_wk)
|
||||||
vars_wk['AutoRuns'] = '{BinDir}\\SysinternalsSuite\\autoruns.exe'.format(**vars_wk)
|
vars_wk['AutoRuns'] = '{BinDir}\\SysinternalsSuite\\autoruns.exe'.format(**vars_wk)
|
||||||
vars_wk['ERUNT'] = '{BinDir}\\erunt\\ERUNT.EXE'.format(**vars_wk)
|
vars_wk['ERUNT'] = '{BinDir}\\erunt\\ERUNT.EXE'.format(**vars_wk)
|
||||||
vars_wk['Everything'] = '{BinDir}\\Everything\\Everything.exe'.format(**vars_wk)
|
vars_wk['Everything'] = '{BinDir}\\Everything\\Everything.exe'.format(**vars_wk)
|
||||||
vars_wk['HWiNFO'] = '{BinDir}\\HWiNFO\\HWiNFO.exe'.format(**vars_wk)
|
vars_wk['HWiNFO'] = '{BinDir}\\HWiNFO\\HWiNFO.exe'.format(**vars_wk)
|
||||||
vars_wk['Notepad2'] = '{BinDir}\\Notepad2\\Notepad2-Mod.exe'.format(**vars_wk)
|
vars_wk['Notepad2'] = '{BinDir}\\Notepad2\\Notepad2-Mod.exe'.format(**vars_wk)
|
||||||
vars_wk['ProduKey'] = '{BinDir}\\ProduKey\\ProduKey.exe'.format(**vars_wk)
|
vars_wk['ProduKey'] = '{BinDir}\\ProduKey\\ProduKey.exe'.format(**vars_wk)
|
||||||
vars_wk['SIV'] = '{BinDir}\\SIV\\SIV.exe'.format(**vars_wk)
|
|
||||||
vars_wk['SevenZip'] = '{BinDir}\\7-Zip\\7za.exe'.format(**vars_wk)
|
vars_wk['SevenZip'] = '{BinDir}\\7-Zip\\7za.exe'.format(**vars_wk)
|
||||||
vars_wk['XMPlay'] = '{BinDir}\\XMPlay\\xmplay.exe'.format(**vars_wk)
|
vars_wk['XMPlay'] = '{BinDir}\\XMPlay\\xmplay.exe'.format(**vars_wk)
|
||||||
if vars_wk['Arch'] == 64:
|
if vars_wk['Arch'] == 64:
|
||||||
|
|
@ -29,7 +29,6 @@ if vars_wk['Arch'] == 64:
|
||||||
vars_wk['HWiNFO'] = vars_wk['HWiNFO'].replace('.exe', '64.exe')
|
vars_wk['HWiNFO'] = vars_wk['HWiNFO'].replace('.exe', '64.exe')
|
||||||
vars_wk['Notepad2'] = vars_wk['Notepad2'].replace('.exe', '64.exe')
|
vars_wk['Notepad2'] = vars_wk['Notepad2'].replace('.exe', '64.exe')
|
||||||
vars_wk['ProduKey'] = vars_wk['ProduKey'].replace('.exe', '64.exe')
|
vars_wk['ProduKey'] = vars_wk['ProduKey'].replace('.exe', '64.exe')
|
||||||
vars_wk['SIV'] = vars_wk['SIV'].replace('.exe', '64.exe')
|
|
||||||
vars_wk['SevenZip'] = vars_wk['SevenZip'].replace('.exe', '64.exe')
|
vars_wk['SevenZip'] = vars_wk['SevenZip'].replace('.exe', '64.exe')
|
||||||
os.makedirs(vars_wk['LogDir'], exist_ok=True)
|
os.makedirs(vars_wk['LogDir'], exist_ok=True)
|
||||||
|
|
||||||
|
|
@ -86,12 +85,21 @@ def cleanup_adwcleaner():
|
||||||
print_error('ERROR: Failed to uninstall AdwCleaner.', vars_wk['LogFile'])
|
print_error('ERROR: Failed to uninstall AdwCleaner.', vars_wk['LogFile'])
|
||||||
|
|
||||||
def cleanup_desktop():
|
def cleanup_desktop():
|
||||||
|
#~#TODO (Pseudo-code)
|
||||||
|
#~#for d in drives:
|
||||||
|
#~# for user in os.scandir('{drive}\\Users'.format(drive=d)):
|
||||||
|
#~# if os.path.exists('{drive}\\Users\\{user}\\Desktop'.format(drive=d, user=user)):
|
||||||
|
#~# for entry in os.scandir('{drive}\\Users\\{user}\\Desktop'.format(drive=d, user=user)):
|
||||||
|
#~# # JRT, RKill, Shortcut cleaner
|
||||||
|
#~# if re.search(r'^((JRT|RKill).*|sc-cleaner)', entry.name, re.IGNORECASE):
|
||||||
|
#~# shutil.move(entry.path, '{ClientDir}\\Info\\{name}'.format(name=entry.name, **vars_wk))
|
||||||
print_info('* Checking Desktop for leftover files', vars_wk['LogFile'])
|
print_info('* Checking Desktop for leftover files', vars_wk['LogFile'])
|
||||||
os.makedirs('{ClientDir}\\Info'.format(**vars_wk), exist_ok=True)
|
os.makedirs('{ClientDir}\\Info'.format(**vars_wk), exist_ok=True)
|
||||||
for entry in os.scandir('{USERPROFILE}\\Desktop'.format(**vars_wk['Env'])):
|
if os.path.exists('{USERPROFILE}\\Desktop'.format(**vars_wk['Env'])):
|
||||||
# JRT, RKill, Shortcut cleaner
|
for entry in os.scandir('{USERPROFILE}\\Desktop'.format(**vars_wk['Env'])):
|
||||||
if re.search(r'^((JRT|RKill).*|sc-cleaner)', entry.name, re.IGNORECASE):
|
# JRT, RKill, Shortcut cleaner
|
||||||
shutil.move(entry.path, '{ClientDir}\\Info\\{name}'.format(name=entry.name, **vars_wk))
|
if re.search(r'^((JRT|RKill).*|sc-cleaner)', entry.name, re.IGNORECASE):
|
||||||
|
shutil.move(entry.path, '{ClientDir}\\Info\\{name}'.format(name=entry.name, **vars_wk))
|
||||||
run_program('rmdir "{path}"'.format(path='{ClientDir}\\Info'.format(**vars_wk)), check=False, shell=True)
|
run_program('rmdir "{path}"'.format(path='{ClientDir}\\Info'.format(**vars_wk)), check=False, shell=True)
|
||||||
|
|
||||||
def exit_script():
|
def exit_script():
|
||||||
|
|
@ -108,14 +116,18 @@ def get_battery_info():
|
||||||
def get_free_space():
|
def get_free_space():
|
||||||
print_info('* Free space', vars_wk['LogFile'])
|
print_info('* Free space', vars_wk['LogFile'])
|
||||||
for drive in get_free_space_info():
|
for drive in get_free_space_info():
|
||||||
print_standard(' {} {}'.format(*drive))
|
print_standard(' {} {}'.format(*drive), vars_wk['LogFile'])
|
||||||
|
|
||||||
def get_installed_ram():
|
def get_installed_ram():
|
||||||
print_info('* Installed RAM', vars_wk['LogFile'])
|
print_info('* Installed RAM', vars_wk['LogFile'])
|
||||||
with open ('{LogDir}\\RAM Information (SIV).txt'.format(**vars_wk), 'r', encoding='utf16') as f:
|
with open ('{LogDir}\\RAM Information (AIDA64).txt'.format(**vars_wk), 'r') as f:
|
||||||
|
_module = ''
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
if re.search(r'^Memory', line, re.IGNORECASE):
|
if re.search(r'Module Size', line, re.IGNORECASE):
|
||||||
print_standard(' ' + line.strip(), vars_wk['LogFile'])
|
_module = re.sub(r'\s*Module Size\s+(.*)\s+\(.*$', r' Module: \1', line.strip())
|
||||||
|
if re.search(r'Memory Speed', line, re.IGNORECASE):
|
||||||
|
_module += re.sub(r'\s*Memory Speed\s+(.*)$', r' \1', line.strip())
|
||||||
|
print_standard(_module, vars_wk['LogFile'])
|
||||||
|
|
||||||
def get_os_info():
|
def get_os_info():
|
||||||
print_info('* Operating System', vars_wk['LogFile'])
|
print_info('* Operating System', vars_wk['LogFile'])
|
||||||
|
|
@ -158,11 +170,11 @@ def get_os_info():
|
||||||
print_warning(' {Name} x{Arch} (unrecognized)'.format(**vars_wk), vars_wk['LogFile'])
|
print_warning(' {Name} x{Arch} (unrecognized)'.format(**vars_wk), vars_wk['LogFile'])
|
||||||
# OS Activation
|
# OS Activation
|
||||||
if re.search(r'permanent', vars_wk['Activation'], re.IGNORECASE):
|
if re.search(r'permanent', vars_wk['Activation'], re.IGNORECASE):
|
||||||
print_standard(' {Activation}'.format(**vars_wk))
|
print_standard(' {Activation}'.format(**vars_wk), vars_wk['LogFile'])
|
||||||
elif re.search(r'unavailable', vars_wk['Activation'], re.IGNORECASE):
|
elif re.search(r'unavailable', vars_wk['Activation'], re.IGNORECASE):
|
||||||
print_warning(' {Activation}'.format(**vars_wk))
|
print_warning(' {Activation}'.format(**vars_wk), vars_wk['LogFile'])
|
||||||
else:
|
else:
|
||||||
print_error(' {Activation}'.format(**vars_wk))
|
print_error(' {Activation}'.format(**vars_wk), vars_wk['LogFile'])
|
||||||
|
|
||||||
def get_ticket_number():
|
def get_ticket_number():
|
||||||
"""Get TicketNumber from user and save it in the info folder."""
|
"""Get TicketNumber from user and save it in the info folder."""
|
||||||
|
|
@ -214,53 +226,60 @@ def run_produkey():
|
||||||
_args = ['/nosavereg', '/stext', '{LogDir}\\Product Keys (ProduKey).txt'.format(**vars_wk)]
|
_args = ['/nosavereg', '/stext', '{LogDir}\\Product Keys (ProduKey).txt'.format(**vars_wk)]
|
||||||
run_program(vars_wk['ProduKey'], _args, check=False)
|
run_program(vars_wk['ProduKey'], _args, check=False)
|
||||||
|
|
||||||
def run_siv():
|
def run_aida64():
|
||||||
extract_item('SIV', vars_wk, silent=True)
|
extract_item('AIDA64', vars_wk, silent=True)
|
||||||
# All system info
|
# All system info
|
||||||
if not os.path.exists('{LogDir}\\System Information (SIV).txt'.format(**vars_wk)):
|
if not os.path.exists('{LogDir}\\System Information (AIDA64).html'.format(**vars_wk)):
|
||||||
print_info('* Saving System information', vars_wk['LogFile'])
|
print_info('* Saving System information', vars_wk['LogFile'])
|
||||||
_cmd = [
|
_cmd = [
|
||||||
vars_wk['SIV'],
|
vars_wk['AIDA64'],
|
||||||
'-KEYS',
|
'/R',
|
||||||
'-LOCAL',
|
'{LogDir}\\System Information (AIDA64).html'.format(**vars_wk),
|
||||||
'-UNICODE',
|
'/CUSTOM',
|
||||||
'-SAVE={LogDir}\\System_Information_(SIV).txt'.format(**vars_wk)]
|
'{BinDir}\\AIDA64\\full.rpf'.format(**vars_wk),
|
||||||
|
'/HTML',
|
||||||
|
'/SILENT']
|
||||||
run_program(_cmd, check=False)
|
run_program(_cmd, check=False)
|
||||||
|
|
||||||
# RAM
|
# RAM
|
||||||
if not os.path.exists('{LogDir}\\RAM_Information_(SIV).txt'.format(**vars_wk)):
|
if not os.path.exists('{LogDir}\\RAM Information (AIDA64).txt'.format(**vars_wk)):
|
||||||
_args = [
|
_cmd = [
|
||||||
'-KEYS',
|
vars_wk['AIDA64'],
|
||||||
'-LOCAL',
|
'/R',
|
||||||
'-UNICODE',
|
'{LogDir}\\RAM Information (AIDA64).txt'.format(**vars_wk),
|
||||||
'-SAVE=[dimms]={LogDir}\\RAM_Information_(SIV).txt'.format(**vars_wk)]
|
'/CUSTOM',
|
||||||
run_program(vars_wk['SIV'], _args, check=False)
|
'{BinDir}\\AIDA64\\ram.rpf'.format(**vars_wk),
|
||||||
|
'/TEXT',
|
||||||
|
'/SILENT']
|
||||||
|
run_program(_cmd, check=False)
|
||||||
|
|
||||||
# Installed Programs
|
# Installed Programs
|
||||||
if not os.path.exists('{LogDir}\\Installed Program List_(SIV).txt'.format(**vars_wk)):
|
if not os.path.exists('{LogDir}\\Installed Program List (AIDA64).txt'.format(**vars_wk)):
|
||||||
print_info('* Saving installed program list', vars_wk['LogFile'])
|
print_info('* Saving installed program list', vars_wk['LogFile'])
|
||||||
_args = [
|
_cmd = [
|
||||||
'-KEYS',
|
vars_wk['AIDA64'],
|
||||||
'-LOCAL',
|
'/R',
|
||||||
'-UNICODE',
|
'{LogDir}\\Installed Program List (AIDA64).txt'.format(**vars_wk),
|
||||||
'-SAVE=[software]={LogDir}\\Installed_Program_List_(SIV).txt'.format(**vars_wk)]
|
'/CUSTOM',
|
||||||
run_program(vars_wk['SIV'], _args, check=False)
|
'{BinDir}\\AIDA64\\installed_programs.rpf'.format(**vars_wk),
|
||||||
|
'/TEXT',
|
||||||
|
'/SILENT',
|
||||||
|
'/SAFEST']
|
||||||
|
run_program(_cmd, check=False)
|
||||||
|
|
||||||
# Product Keys
|
# Product Keys
|
||||||
if not os.path.exists('{LogDir}\\Product Keys (SIV).txt'.format(**vars_wk)):
|
if not os.path.exists('{LogDir}\\Product Keys (AIDA64).txt'.format(**vars_wk)):
|
||||||
print_info('* Saving product keys', vars_wk['LogFile'])
|
print_info('* Saving product keys', vars_wk['LogFile'])
|
||||||
_args = [
|
_cmd = [
|
||||||
'-KEYS',
|
vars_wk['AIDA64'],
|
||||||
'-LOCAL',
|
'/R',
|
||||||
'-UNICODE',
|
'{LogDir}\\Product Keys (AIDA64).txt'.format(**vars_wk),
|
||||||
'-SAVE=[product-ids]={LogDir}\\Product_Keys_(SIV).txt'.format(**vars_wk)]
|
'/CUSTOM',
|
||||||
run_program(vars_wk['SIV'], _args, check=False)
|
'{BinDir}\\AIDA64\\licenses.rpf'.format(**vars_wk),
|
||||||
extract_item('ProduKey', vars_wk, silent=True)
|
'/TEXT',
|
||||||
|
'/SILENT',
|
||||||
# Rename files
|
'/SAFEST']
|
||||||
for item in os.scandir(vars_wk['LogDir']):
|
run_program(_cmd, check=False)
|
||||||
if re.search(r'SIV', item.name, re.IGNORECASE):
|
|
||||||
shutil.move(item.path, item.path.replace('_', ' ').title().replace('Siv', 'SIV'))
|
|
||||||
|
|
||||||
def run_xmplay():
|
def run_xmplay():
|
||||||
extract_item('XMPlay', vars_wk, silent=True)
|
extract_item('XMPlay', vars_wk, silent=True)
|
||||||
|
|
@ -358,7 +377,7 @@ if __name__ == '__main__':
|
||||||
update_clock()
|
update_clock()
|
||||||
backup_power_plans()
|
backup_power_plans()
|
||||||
backup_registry()
|
backup_registry()
|
||||||
run_siv()
|
run_aida64()
|
||||||
run_produkey()
|
run_produkey()
|
||||||
|
|
||||||
## System information ##
|
## System information ##
|
||||||
|
|
@ -388,7 +407,7 @@ if __name__ == '__main__':
|
||||||
pause('Press Enter exit...')
|
pause('Press Enter exit...')
|
||||||
|
|
||||||
# Open log
|
# Open log
|
||||||
extract_item('Notepad2', vars_wk)
|
extract_item('Notepad2', vars_wk, silent=True)
|
||||||
subprocess.Popen([vars_wk['Notepad2'], vars_wk['LogFile']])
|
subprocess.Popen([vars_wk['Notepad2'], vars_wk['LogFile']])
|
||||||
|
|
||||||
# Quit
|
# Quit
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ vars_wk = init_vars_wk()
|
||||||
vars_wk.update(init_vars_os())
|
vars_wk.update(init_vars_os())
|
||||||
vars_wk['BackupDir'] = '{ClientDir}\\Backups\\{Date}'.format(**vars_wk)
|
vars_wk['BackupDir'] = '{ClientDir}\\Backups\\{Date}'.format(**vars_wk)
|
||||||
vars_wk['LogFile'] = '{LogDir}\\Software Diagnostics.log'.format(**vars_wk)
|
vars_wk['LogFile'] = '{LogDir}\\Software Diagnostics.log'.format(**vars_wk)
|
||||||
|
vars_wk['AIDA64'] = '{BinDir}\\AIDA64\\aida64.exe'.format(**vars_wk)
|
||||||
vars_wk['AutoRuns'] = '{BinDir}\\SysinternalsSuite\\autoruns.exe'.format(**vars_wk)
|
vars_wk['AutoRuns'] = '{BinDir}\\SysinternalsSuite\\autoruns.exe'.format(**vars_wk)
|
||||||
vars_wk['BleachBit'] = '{BinDir}\\BleachBit\\bleachbit_console.exe'.format(**vars_wk)
|
vars_wk['BleachBit'] = '{BinDir}\\BleachBit\\bleachbit_console.exe'.format(**vars_wk)
|
||||||
vars_wk['ERUNT'] = '{BinDir}\\erunt\\ERUNT.EXE'.format(**vars_wk)
|
vars_wk['ERUNT'] = '{BinDir}\\erunt\\ERUNT.EXE'.format(**vars_wk)
|
||||||
|
|
@ -20,7 +21,6 @@ vars_wk['Everything'] = '{BinDir}\\Everything\\Everything.exe'.format(**vars_wk)
|
||||||
vars_wk['HitmanPro'] = '{BinDir}\\HitmanPro\\HitmanPro.exe'.format(**vars_wk)
|
vars_wk['HitmanPro'] = '{BinDir}\\HitmanPro\\HitmanPro.exe'.format(**vars_wk)
|
||||||
vars_wk['Notepad2'] = '{BinDir}\\Notepad2\\Notepad2-Mod.exe'.format(**vars_wk)
|
vars_wk['Notepad2'] = '{BinDir}\\Notepad2\\Notepad2-Mod.exe'.format(**vars_wk)
|
||||||
vars_wk['ProduKey'] = '{BinDir}\\ProduKey\\ProduKey.exe'.format(**vars_wk)
|
vars_wk['ProduKey'] = '{BinDir}\\ProduKey\\ProduKey.exe'.format(**vars_wk)
|
||||||
vars_wk['SIV'] = '{BinDir}\\SIV\\SIV.exe'.format(**vars_wk)
|
|
||||||
vars_wk['SevenZip'] = '{BinDir}\\7-Zip\\7za.exe'.format(**vars_wk)
|
vars_wk['SevenZip'] = '{BinDir}\\7-Zip\\7za.exe'.format(**vars_wk)
|
||||||
if vars_wk['Arch'] == 64:
|
if vars_wk['Arch'] == 64:
|
||||||
vars_wk['AutoRuns'] = vars_wk['AutoRuns'].replace('.exe', '64.exe')
|
vars_wk['AutoRuns'] = vars_wk['AutoRuns'].replace('.exe', '64.exe')
|
||||||
|
|
@ -28,7 +28,6 @@ if vars_wk['Arch'] == 64:
|
||||||
vars_wk['HitmanPro'] = vars_wk['HitmanPro'].replace('.exe', '64.exe')
|
vars_wk['HitmanPro'] = vars_wk['HitmanPro'].replace('.exe', '64.exe')
|
||||||
vars_wk['Notepad2'] = vars_wk['Notepad2'].replace('.exe', '64.exe')
|
vars_wk['Notepad2'] = vars_wk['Notepad2'].replace('.exe', '64.exe')
|
||||||
vars_wk['ProduKey'] = vars_wk['ProduKey'].replace('.exe', '64.exe')
|
vars_wk['ProduKey'] = vars_wk['ProduKey'].replace('.exe', '64.exe')
|
||||||
vars_wk['SIV'] = vars_wk['SIV'].replace('.exe', '64.exe')
|
|
||||||
vars_wk['SevenZip'] = vars_wk['SevenZip'].replace('.exe', '64.exe')
|
vars_wk['SevenZip'] = vars_wk['SevenZip'].replace('.exe', '64.exe')
|
||||||
os.makedirs(vars_wk['LogDir'], exist_ok=True)
|
os.makedirs(vars_wk['LogDir'], exist_ok=True)
|
||||||
|
|
||||||
|
|
@ -127,21 +126,25 @@ def get_battery_info():
|
||||||
def get_free_space():
|
def get_free_space():
|
||||||
print_info('* Free space', vars_wk['LogFile'])
|
print_info('* Free space', vars_wk['LogFile'])
|
||||||
for drive in get_free_space_info():
|
for drive in get_free_space_info():
|
||||||
print_standard(' {} {}'.format(*drive))
|
print_standard(' {} {}'.format(*drive), vars_wk['LogFile'])
|
||||||
|
|
||||||
def get_installed_office():
|
def get_installed_office():
|
||||||
print_info('* Installed Office programs', vars_wk['LogFile'])
|
print_info('* Installed Office programs', vars_wk['LogFile'])
|
||||||
with open ('{LogDir}\\Installed Program List (SIV).txt'.format(**vars_wk), 'r', encoding='utf16') as f:
|
with open ('{LogDir}\\Installed Program List (AIDA64).txt'.format(**vars_wk), 'r') as f:
|
||||||
for line in sorted(f.readlines()):
|
for line in sorted(f.readlines()):
|
||||||
if re.search(r'(Microsoft (Office\s+(365|Enterprise|Home|Pro(\s|fessional)|Single|Small|Standard|Starter|Ultimate|system)|Works[-\s\d]+\d)|(Libre|Open|Star)\s*Office|WordPerfect|Gnumeric|Abiword)', line, re.IGNORECASE):
|
if re.search(r'(Microsoft (Office\s+(365|Enterprise|Home|Pro(\s|fessional)|Single|Small|Standard|Starter|Ultimate|system)|Works[-\s\d]+\d)|(Libre|Open|Star)\s*Office|WordPerfect|Gnumeric|Abiword)', line, re.IGNORECASE):
|
||||||
print_standard(' ' + line[18:96].strip(), vars_wk['LogFile'])
|
print_standard(' ' + line[4:82].strip(), vars_wk['LogFile'])
|
||||||
|
|
||||||
def get_installed_ram():
|
def get_installed_ram():
|
||||||
print_info('* Installed RAM', vars_wk['LogFile'])
|
print_info('* Installed RAM', vars_wk['LogFile'])
|
||||||
with open ('{LogDir}\\RAM Information (SIV).txt'.format(**vars_wk), 'r', encoding='utf16') as f:
|
with open ('{LogDir}\\RAM Information (AIDA64).txt'.format(**vars_wk), 'r') as f:
|
||||||
|
_module = ''
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
if re.search(r'^Memory', line, re.IGNORECASE):
|
if re.search(r'Module Size', line, re.IGNORECASE):
|
||||||
print_standard(' ' + line.strip(), vars_wk['LogFile'])
|
_module = re.sub(r'\s*Module Size\s+(.*)\s+\(.*$', r' Module: \1', line.strip())
|
||||||
|
if re.search(r'Memory Speed', line, re.IGNORECASE):
|
||||||
|
_module += re.sub(r'\s*Memory Speed\s+(.*)$', r' \1', line.strip())
|
||||||
|
print_standard(_module, vars_wk['LogFile'])
|
||||||
|
|
||||||
def get_os_info():
|
def get_os_info():
|
||||||
print_info('* Operating System', vars_wk['LogFile'])
|
print_info('* Operating System', vars_wk['LogFile'])
|
||||||
|
|
@ -184,11 +187,11 @@ def get_os_info():
|
||||||
print_warning(' {Name} x{Arch} (unrecognized)'.format(**vars_wk), vars_wk['LogFile'])
|
print_warning(' {Name} x{Arch} (unrecognized)'.format(**vars_wk), vars_wk['LogFile'])
|
||||||
# OS Activation
|
# OS Activation
|
||||||
if re.search(r'permanent', vars_wk['Activation'], re.IGNORECASE):
|
if re.search(r'permanent', vars_wk['Activation'], re.IGNORECASE):
|
||||||
print_standard(' {Activation}'.format(**vars_wk))
|
print_standard(' {Activation}'.format(**vars_wk), vars_wk['LogFile'])
|
||||||
elif re.search(r'unavailable', vars_wk['Activation'], re.IGNORECASE):
|
elif re.search(r'unavailable', vars_wk['Activation'], re.IGNORECASE):
|
||||||
print_warning(' {Activation}'.format(**vars_wk))
|
print_warning(' {Activation}'.format(**vars_wk), vars_wk['LogFile'])
|
||||||
else:
|
else:
|
||||||
print_error(' {Activation}'.format(**vars_wk))
|
print_error(' {Activation}'.format(**vars_wk), vars_wk['LogFile'])
|
||||||
|
|
||||||
def get_product_keys():
|
def get_product_keys():
|
||||||
print_info('* Product Keys', vars_wk['LogFile'])
|
print_info('* Product Keys', vars_wk['LogFile'])
|
||||||
|
|
@ -401,57 +404,65 @@ def run_rkill():
|
||||||
abort()
|
abort()
|
||||||
|
|
||||||
# RKill cleanup
|
# RKill cleanup
|
||||||
for item in os.scandir('{USERPROFILE}\\Desktop'.format(**vars_wk['Env'])):
|
if os.path.exists('{USERPROFILE}\\Desktop'.format(**vars_wk['Env'])):
|
||||||
if re.search(r'^RKill', item.name, re.IGNORECASE):
|
for item in os.scandir('{USERPROFILE}\\Desktop'.format(**vars_wk['Env'])):
|
||||||
shutil.move(item.path, '{ClientDir}\\Info\\{name}'.format(name=item.name, **vars_wk))
|
if re.search(r'^RKill', item.name, re.IGNORECASE):
|
||||||
|
shutil.move(item.path, '{ClientDir}\\Info\\{name}'.format(name=item.name, **vars_wk))
|
||||||
|
|
||||||
def run_siv():
|
def run_aida64():
|
||||||
extract_item('SIV', vars_wk, silent=True)
|
extract_item('AIDA64', vars_wk, silent=True)
|
||||||
# All system info
|
# All system info
|
||||||
if not os.path.exists('{LogDir}\\System Information (SIV).txt'.format(**vars_wk)):
|
if not os.path.exists('{LogDir}\\System Information (AIDA64).html'.format(**vars_wk)):
|
||||||
print_info('* Saving System information', vars_wk['LogFile'])
|
print_info('* Saving System information', vars_wk['LogFile'])
|
||||||
_cmd = [
|
_cmd = [
|
||||||
vars_wk['SIV'],
|
vars_wk['AIDA64'],
|
||||||
'-KEYS',
|
'/R',
|
||||||
'-LOCAL',
|
'{LogDir}\\System Information (AIDA64).html'.format(**vars_wk),
|
||||||
'-UNICODE',
|
'/CUSTOM',
|
||||||
'-SAVE={LogDir}\\System_Information_(SIV).txt'.format(**vars_wk)]
|
'{BinDir}\\AIDA64\\full.rpf'.format(**vars_wk),
|
||||||
|
'/HTML',
|
||||||
|
'/SILENT']
|
||||||
run_program(_cmd, check=False)
|
run_program(_cmd, check=False)
|
||||||
|
|
||||||
# RAM
|
# RAM
|
||||||
if not os.path.exists('{LogDir}\\RAM_Information_(SIV).txt'.format(**vars_wk)):
|
if not os.path.exists('{LogDir}\\RAM Information (AIDA64).txt'.format(**vars_wk)):
|
||||||
_args = [
|
_cmd = [
|
||||||
'-KEYS',
|
vars_wk['AIDA64'],
|
||||||
'-LOCAL',
|
'/R',
|
||||||
'-UNICODE',
|
'{LogDir}\\RAM Information (AIDA64).txt'.format(**vars_wk),
|
||||||
'-SAVE=[dimms]={LogDir}\\RAM_Information_(SIV).txt'.format(**vars_wk)]
|
'/CUSTOM',
|
||||||
run_program(vars_wk['SIV'], _args, check=False)
|
'{BinDir}\\AIDA64\\ram.rpf'.format(**vars_wk),
|
||||||
|
'/TEXT',
|
||||||
|
'/SILENT']
|
||||||
|
run_program(_cmd, check=False)
|
||||||
|
|
||||||
# Installed Programs
|
# Installed Programs
|
||||||
if not os.path.exists('{LogDir}\\Installed Program List_(SIV).txt'.format(**vars_wk)):
|
if not os.path.exists('{LogDir}\\Installed Program List (AIDA64).txt'.format(**vars_wk)):
|
||||||
print_info('* Saving installed program list', vars_wk['LogFile'])
|
print_info('* Saving installed program list', vars_wk['LogFile'])
|
||||||
_args = [
|
_cmd = [
|
||||||
'-KEYS',
|
vars_wk['AIDA64'],
|
||||||
'-LOCAL',
|
'/R',
|
||||||
'-UNICODE',
|
'{LogDir}\\Installed Program List (AIDA64).txt'.format(**vars_wk),
|
||||||
'-SAVE=[software]={LogDir}\\Installed_Program_List_(SIV).txt'.format(**vars_wk)]
|
'/CUSTOM',
|
||||||
run_program(vars_wk['SIV'], _args, check=False)
|
'{BinDir}\\AIDA64\\installed_programs.rpf'.format(**vars_wk),
|
||||||
|
'/TEXT',
|
||||||
|
'/SILENT',
|
||||||
|
'/SAFEST']
|
||||||
|
run_program(_cmd, check=False)
|
||||||
|
|
||||||
# Product Keys
|
# Product Keys
|
||||||
if not os.path.exists('{LogDir}\\Product Keys (SIV).txt'.format(**vars_wk)):
|
if not os.path.exists('{LogDir}\\Product Keys (AIDA64).txt'.format(**vars_wk)):
|
||||||
print_info('* Saving product keys', vars_wk['LogFile'])
|
print_info('* Saving product keys', vars_wk['LogFile'])
|
||||||
_args = [
|
_cmd = [
|
||||||
'-KEYS',
|
vars_wk['AIDA64'],
|
||||||
'-LOCAL',
|
'/R',
|
||||||
'-UNICODE',
|
'{LogDir}\\Product Keys (AIDA64).txt'.format(**vars_wk),
|
||||||
'-SAVE=[product-ids]={LogDir}\\Product_Keys_(SIV).txt'.format(**vars_wk)]
|
'/CUSTOM',
|
||||||
run_program(vars_wk['SIV'], _args, check=False)
|
'{BinDir}\\AIDA64\\licenses.rpf'.format(**vars_wk),
|
||||||
extract_item('ProduKey', vars_wk, silent=True)
|
'/TEXT',
|
||||||
|
'/SILENT',
|
||||||
# Rename files
|
'/SAFEST']
|
||||||
for item in os.scandir(vars_wk['LogDir']):
|
run_program(_cmd, check=False)
|
||||||
if re.search(r'SIV', item.name, re.IGNORECASE):
|
|
||||||
shutil.move(item.path, item.path.replace('_', ' ').title().replace('Siv', 'SIV'))
|
|
||||||
|
|
||||||
def run_sfc_scan():
|
def run_sfc_scan():
|
||||||
"""Run SFC in a "split window" and report errors."""
|
"""Run SFC in a "split window" and report errors."""
|
||||||
|
|
@ -544,7 +555,7 @@ if __name__ == '__main__':
|
||||||
backup_power_plans()
|
backup_power_plans()
|
||||||
backup_registry()
|
backup_registry()
|
||||||
backup_browsers()
|
backup_browsers()
|
||||||
run_siv()
|
run_aida64()
|
||||||
run_produkey()
|
run_produkey()
|
||||||
|
|
||||||
# Summary
|
# Summary
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ def is_valid_image(item):
|
||||||
run_program(_cmd)
|
run_program(_cmd)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
_valid = False
|
_valid = False
|
||||||
print_warning('WARNING: Image damaged.', vars_wk['LogFile'])
|
print_warning('WARNING: Image "{image}" damaged.'.format(image=item.name), vars_wk['LogFile'])
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
return _valid
|
return _valid
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ set L_ITEM=aida64.exe
|
||||||
set L_ARGS=
|
set L_ARGS=
|
||||||
set L_7ZIP=
|
set L_7ZIP=
|
||||||
set L_CHCK=True
|
set L_CHCK=True
|
||||||
set L_ELEV=True
|
set L_ELEV=
|
||||||
set L_NCMD=True
|
set L_NCMD=True
|
||||||
set L_WAIT=
|
set L_WAIT=
|
||||||
|
|
||||||
119
Diagnostics/Extras/HWiNFO (Summary).cmd
Normal file
119
Diagnostics/Extras/HWiNFO (Summary).cmd
Normal file
|
|
@ -0,0 +1,119 @@
|
||||||
|
:: Wizard Kit: Launcher Script ::
|
||||||
|
::
|
||||||
|
:: This script works by setting env variables and then calling Launch.cmd
|
||||||
|
:: which inherits the variables. This bypasses batch file argument parsing
|
||||||
|
:: which is awful.
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
:Init
|
||||||
|
setlocal
|
||||||
|
title Wizard Kit: Launcher
|
||||||
|
call :CheckFlags %*
|
||||||
|
call :FindBin
|
||||||
|
|
||||||
|
:Configure
|
||||||
|
rem just configure for both x32 & x64
|
||||||
|
for %%a in (32 64) do (
|
||||||
|
copy /y "%bin%\HWiNFO\general.ini" "%bin%\HWiNFO\HWiNFO%%a.ini"
|
||||||
|
(echo SensorsOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
|
||||||
|
(echo SummaryOnly=1)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
|
||||||
|
)
|
||||||
|
|
||||||
|
:DefineLaunch
|
||||||
|
:: Set L_TYPE to one of these options:
|
||||||
|
:: Console, Folder, Office, Program, PSScript, or PyScript
|
||||||
|
:: Set L_PATH to the path to the program folder
|
||||||
|
:: NOTE: Launch.cmd will test for L_PATH in the following order:
|
||||||
|
:: 1: %cbin%\L_PATH.7z (which will be extracted to %bin%\L_PATH)
|
||||||
|
:: 2: %bin%\L_PATH
|
||||||
|
:: 3. %L_PATH% (i.e. treat L_PATH as an absolute path)
|
||||||
|
:: Set L_ITEM to one of the following:
|
||||||
|
:: 1. The filename of the item to launch
|
||||||
|
:: 2. The Office product to install
|
||||||
|
:: 3. '.' to open extracted folder
|
||||||
|
:: Set L_ARGS to include any necessary arguments (if any)
|
||||||
|
:: Set L_7ZIP to include any necessary arguments for extraction
|
||||||
|
:: Set L_CHCK to True to have Launch.cmd to stay open if an error is encountered
|
||||||
|
:: Set L_ELEV to True to launch with elevated permissions
|
||||||
|
:: Set L_NCMD to True to stay in the native console window
|
||||||
|
:: Set L_WAIT to True to have the script wait until L_ITEM has comlpeted
|
||||||
|
set L_TYPE=Program
|
||||||
|
set L_PATH=HWiNFO
|
||||||
|
set L_ITEM=HWiNFO.exe
|
||||||
|
set L_ARGS=
|
||||||
|
set L_7ZIP=
|
||||||
|
set L_CHCK=True
|
||||||
|
set L_ELEV=
|
||||||
|
set L_NCMD=True
|
||||||
|
set L_WAIT=
|
||||||
|
|
||||||
|
:::::::::::::::::::::::::::::::::::::::::::
|
||||||
|
:: Do not edit anything below this line! ::
|
||||||
|
:::::::::::::::::::::::::::::::::::::::::::
|
||||||
|
|
||||||
|
:LaunchPrep
|
||||||
|
rem Verifies the environment before launching item
|
||||||
|
if not defined bin (goto ErrorNoBin)
|
||||||
|
if not exist "%bin%\Scripts\Launch.cmd" (goto ErrorLaunchCMDMissing)
|
||||||
|
|
||||||
|
:Launch
|
||||||
|
rem Calls the Launch.cmd script using the variables defined above
|
||||||
|
call "%bin%\Scripts\Launch.cmd" || goto ErrorLaunchCMD
|
||||||
|
goto Exit
|
||||||
|
|
||||||
|
:: Functions ::
|
||||||
|
:CheckFlags
|
||||||
|
rem Loops through all arguments to check for accepted flags
|
||||||
|
set DEBUG=
|
||||||
|
for %%f in (%*) do (
|
||||||
|
if /i "%%f" == "/DEBUG" (@echo on & set "DEBUG=/DEBUG")
|
||||||
|
)
|
||||||
|
@exit /b 0
|
||||||
|
|
||||||
|
:FindBin
|
||||||
|
rem Checks the current directory and all parents for the ".bin" folder
|
||||||
|
rem NOTE: Has not been tested for UNC paths
|
||||||
|
set bin=
|
||||||
|
pushd "%~dp0"
|
||||||
|
:FindBinInner
|
||||||
|
if exist ".bin" (goto FindBinDone)
|
||||||
|
if "%~d0\" == "%cd%" (popd & @exit /b 1)
|
||||||
|
cd ..
|
||||||
|
goto FindBinInner
|
||||||
|
:FindBinDone
|
||||||
|
set "bin=%cd%\.bin"
|
||||||
|
set "cbin=%cd%\.cbin"
|
||||||
|
popd
|
||||||
|
@exit /b 0
|
||||||
|
|
||||||
|
:: Errors ::
|
||||||
|
:ErrorLaunchCMD
|
||||||
|
echo.
|
||||||
|
echo ERROR: Launch.cmd did not run correctly. Try using the /DEBUG flag?
|
||||||
|
goto Abort
|
||||||
|
|
||||||
|
:ErrorLaunchCMDMissing
|
||||||
|
echo.
|
||||||
|
echo ERROR: Launch.cmd script not found.
|
||||||
|
goto Abort
|
||||||
|
|
||||||
|
:ErrorNoBin
|
||||||
|
echo.
|
||||||
|
echo ERROR: ".bin" folder not found.
|
||||||
|
goto Abort
|
||||||
|
|
||||||
|
:Abort
|
||||||
|
color 4e
|
||||||
|
echo Aborted.
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit...
|
||||||
|
pause>nul
|
||||||
|
color
|
||||||
|
rem Set errorlevel to 1 by calling color incorrectly
|
||||||
|
color 00
|
||||||
|
goto Exit
|
||||||
|
|
||||||
|
:: Cleanup and exit ::
|
||||||
|
:Exit
|
||||||
|
endlocal
|
||||||
|
exit /b %errorlevel%
|
||||||
|
|
@ -11,14 +11,6 @@ title Wizard Kit: Launcher
|
||||||
call :CheckFlags %*
|
call :CheckFlags %*
|
||||||
call :FindBin
|
call :FindBin
|
||||||
|
|
||||||
:Configure
|
|
||||||
rem just configure for both x32 & x64
|
|
||||||
for %%a in (32 64) do (
|
|
||||||
copy /y "%bin%\HWiNFO\general.ini" "%bin%\HWiNFO\HWiNFO%%a.ini"
|
|
||||||
(echo SensorsOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
|
|
||||||
(echo SummaryOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
|
|
||||||
)
|
|
||||||
|
|
||||||
:OpenDriverPage
|
:OpenDriverPage
|
||||||
start "" "http://us.acer.com/ac/en/US/content/drivers"
|
start "" "http://us.acer.com/ac/en/US/content/drivers"
|
||||||
|
|
||||||
|
|
@ -41,8 +33,8 @@ start "" "http://us.acer.com/ac/en/US/content/drivers"
|
||||||
:: Set L_NCMD to True to stay in the native console window
|
:: Set L_NCMD to True to stay in the native console window
|
||||||
:: Set L_WAIT to True to have the script wait until L_ITEM has comlpeted
|
:: Set L_WAIT to True to have the script wait until L_ITEM has comlpeted
|
||||||
set L_TYPE=Program
|
set L_TYPE=Program
|
||||||
set L_PATH=HWiNFO
|
set L_PATH=AIDA64
|
||||||
set L_ITEM=HWiNFO.exe
|
set L_ITEM=aida64.exe
|
||||||
set L_ARGS=
|
set L_ARGS=
|
||||||
set L_7ZIP=
|
set L_7ZIP=
|
||||||
set L_CHCK=True
|
set L_CHCK=True
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,6 @@ title Wizard Kit: Launcher
|
||||||
call :CheckFlags %*
|
call :CheckFlags %*
|
||||||
call :FindBin
|
call :FindBin
|
||||||
|
|
||||||
:Configure
|
|
||||||
rem just configure for both x32 & x64
|
|
||||||
for %%a in (32 64) do (
|
|
||||||
copy /y "%bin%\HWiNFO\general.ini" "%bin%\HWiNFO\HWiNFO%%a.ini"
|
|
||||||
(echo SensorsOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
|
|
||||||
(echo SummaryOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
|
|
||||||
)
|
|
||||||
|
|
||||||
:OpenDriverPage
|
:OpenDriverPage
|
||||||
start "" "http://support.lenovo.com/us/en/products?tabName=Downloads"
|
start "" "http://support.lenovo.com/us/en/products?tabName=Downloads"
|
||||||
|
|
||||||
|
|
@ -41,8 +33,8 @@ start "" "http://support.lenovo.com/us/en/products?tabName=Downloads"
|
||||||
:: Set L_NCMD to True to stay in the native console window
|
:: Set L_NCMD to True to stay in the native console window
|
||||||
:: Set L_WAIT to True to have the script wait until L_ITEM has comlpeted
|
:: Set L_WAIT to True to have the script wait until L_ITEM has comlpeted
|
||||||
set L_TYPE=Program
|
set L_TYPE=Program
|
||||||
set L_PATH=HWiNFO
|
set L_PATH=AIDA64
|
||||||
set L_ITEM=HWiNFO.exe
|
set L_ITEM=aida64.exe
|
||||||
set L_ARGS=
|
set L_ARGS=
|
||||||
set L_7ZIP=
|
set L_7ZIP=
|
||||||
set L_CHCK=True
|
set L_CHCK=True
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,6 @@ title Wizard Kit: Launcher
|
||||||
call :CheckFlags %*
|
call :CheckFlags %*
|
||||||
call :FindBin
|
call :FindBin
|
||||||
|
|
||||||
:Configure
|
|
||||||
rem just configure for both x32 & x64
|
|
||||||
for %%a in (32 64) do (
|
|
||||||
copy /y "%bin%\HWiNFO\general.ini" "%bin%\HWiNFO\HWiNFO%%a.ini"
|
|
||||||
(echo SensorsOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
|
|
||||||
(echo SummaryOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
|
|
||||||
)
|
|
||||||
|
|
||||||
:OpenDriverPage
|
:OpenDriverPage
|
||||||
start "" "http://support.toshiba.com/drivers"
|
start "" "http://support.toshiba.com/drivers"
|
||||||
|
|
||||||
|
|
@ -41,8 +33,8 @@ start "" "http://support.toshiba.com/drivers"
|
||||||
:: Set L_NCMD to True to stay in the native console window
|
:: Set L_NCMD to True to stay in the native console window
|
||||||
:: Set L_WAIT to True to have the script wait until L_ITEM has comlpeted
|
:: Set L_WAIT to True to have the script wait until L_ITEM has comlpeted
|
||||||
set L_TYPE=Program
|
set L_TYPE=Program
|
||||||
set L_PATH=HWiNFO
|
set L_PATH=AIDA64
|
||||||
set L_ITEM=HWiNFO.exe
|
set L_ITEM=aida64.exe
|
||||||
set L_ARGS=
|
set L_ARGS=
|
||||||
set L_7ZIP=
|
set L_7ZIP=
|
||||||
set L_CHCK=True
|
set L_CHCK=True
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue