From d725837f9b829936e11c9a29511430df3b497ff9 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 28 Sep 2021 19:21:30 -0600 Subject: [PATCH] Add AIDA64 sections Replaced old report profiles with a new basic profile. Several sections that just slow down the process have been removed. --- scripts/auto_setup.py | 2 +- scripts/wk/setup/win.py | 27 ++++- setup/windows/cbin/_include/AIDA64/basic.rpf | 35 +++++++ setup/windows/cbin/_include/AIDA64/full.rpf | 98 ------------------- .../_include/AIDA64/installed_programs.rpf | 1 - .../windows/cbin/_include/AIDA64/licenses.rpf | 1 - 6 files changed, 60 insertions(+), 104 deletions(-) create mode 100644 setup/windows/cbin/_include/AIDA64/basic.rpf delete mode 100644 setup/windows/cbin/_include/AIDA64/full.rpf delete mode 100644 setup/windows/cbin/_include/AIDA64/installed_programs.rpf delete mode 100644 setup/windows/cbin/_include/AIDA64/licenses.rpf diff --git a/scripts/auto_setup.py b/scripts/auto_setup.py index 08b2a9ca..79f23de5 100644 --- a/scripts/auto_setup.py +++ b/scripts/auto_setup.py @@ -133,7 +133,7 @@ BASE_MENUS = { MenuEntry(r'Windows\Temp Fix', 'auto_windows_temp_fix'), ), 'System Information': ( - MenuEntry('AIDA64 Reports', no_op), + MenuEntry('AIDA64 Report', 'auto_export_aida64_report'), MenuEntry('Backup Registry', 'auto_backup_registry'), MenuEntry('Everything (File List)', no_op), ), diff --git a/scripts/wk/setup/win.py b/scripts/wk/setup/win.py index cd0e29b5..786d4371 100644 --- a/scripts/wk/setup/win.py +++ b/scripts/wk/setup/win.py @@ -23,6 +23,7 @@ from wk.kit.tools import ( ) from wk.log import format_log_path, update_log_path from wk.std import ( + GenericError, GenericWarning, Menu, TryAndPrint, @@ -518,6 +519,11 @@ def auto_enable_ublock_origin(): print(f'\033[F\r{" "*len(prompt)}\r', end='', flush=True) +def auto_export_aida64_report(): + """Export AIDA64 reports.""" + TRY_PRINT.run('AIDA64 Report...', export_aida64_report) + + def auto_install_firefox(): """Install Firefox.""" TRY_PRINT.run('Firefox...', install_firefox) @@ -889,10 +895,25 @@ def get_firefox_default_profile(profiles_ini): # Tool Functions -## TODO? +def export_aida64_report(): + """Export AIDA64 report.""" + report_path = format_log_path( + log_name='AIDA64 System Report', + tool=True, timestamp=True, + ) + report_path = report_path.with_suffix('.html') + report_path.parent.mkdir(parents=True, exist_ok=True) + + # Run AIDA64 and check result + proc = run_tool( + 'AIDA64', 'aida64', + '/R', report_path, + '/CUSTOM', 'basic.rpf', + '/HTML', '/SILENT', '/SAFEST', + cbin=True, cwd=True) + if proc.returncode: + raise GenericError('Error(s) encountered exporting report.') -# OS Built-in Functions -## TODO? if __name__ == '__main__': print("This file is not meant to be called directly.") diff --git a/setup/windows/cbin/_include/AIDA64/basic.rpf b/setup/windows/cbin/_include/AIDA64/basic.rpf new file mode 100644 index 00000000..c3bc9648 --- /dev/null +++ b/setup/windows/cbin/_include/AIDA64/basic.rpf @@ -0,0 +1,35 @@ +InfoPage="Computer;Summary" +InfoPage="Computer;Computer Name" +InfoPage="Computer;DMI" +InfoPage="Computer;IPMI" +InfoPage="Computer;Overclock" +InfoPage="Computer;Power Management" +InfoPage="Motherboard;CPU" +InfoPage="Motherboard;Motherboard" +InfoPage="Motherboard;Memory" +InfoPage="Motherboard;SPD" +InfoPage="Motherboard;Chipset" +InfoPage="Motherboard;BIOS" +InfoPage="Operating System;Operating System" +InfoPage="Server;Users" +InfoPage="Storage;Windows Storage" +InfoPage="Storage;Logical Drives" +InfoPage="Storage;Physical Drives" +InfoPage="Storage;Optical Drives" +InfoPage="Storage;ASPI" +InfoPage="Storage;ATA" +InfoPage="Storage;SMART" +InfoPage="Network;Windows Network" +InfoPage="Devices;Windows Devices" +InfoPage="Devices;Physical Devices" +InfoPage="Devices;PCI Devices" +InfoPage="Software;Auto Start" +InfoPage="Software;Scheduled" +InfoPage="Software;Installed Programs" +InfoPage="Software;Licenses" +InfoPage="Security;Windows Security" +InfoPage="Security;Windows Update" +InfoPage="Security;Anti-Virus" +InfoPage="Security;Firewall" +InfoPage="Security;Anti-Spyware" +InfoPage="Security;Anti-Trojan" diff --git a/setup/windows/cbin/_include/AIDA64/full.rpf b/setup/windows/cbin/_include/AIDA64/full.rpf deleted file mode 100644 index 8d7df2ad..00000000 --- a/setup/windows/cbin/_include/AIDA64/full.rpf +++ /dev/null @@ -1,98 +0,0 @@ -InfoPage="Computer;Summary" -InfoPage="Computer;Computer Name" -InfoPage="Computer;DMI" -InfoPage="Computer;IPMI" -InfoPage="Computer;Overclock" -InfoPage="Computer;Power Management" -InfoPage="Computer;Portable Computer" -InfoPage="Motherboard;CPU" -InfoPage="Motherboard;CPUID" -InfoPage="Motherboard;Motherboard" -InfoPage="Motherboard;Memory" -InfoPage="Motherboard;SPD" -InfoPage="Motherboard;Chipset" -InfoPage="Motherboard;BIOS" -InfoPage="Motherboard;ACPI" -InfoPage="Operating System;Operating System" -InfoPage="Operating System;Processes" -InfoPage="Operating System;System Drivers" -InfoPage="Operating System;Services" -InfoPage="Operating System;AX Files" -InfoPage="Operating System;DLL Files" -InfoPage="Operating System;Certificates" -InfoPage="Operating System;UpTime" -InfoPage="Server;Share" -InfoPage="Server;Opened Files" -InfoPage="Server;Account Security" -InfoPage="Server;Logon" -InfoPage="Server;Users" -InfoPage="Server;Local Groups" -InfoPage="Server;Global Groups" -InfoPage="Display;Windows Video" -InfoPage="Display;PCI / AGP Video" -InfoPage="Display;GPU" -InfoPage="Display;Monitor" -InfoPage="Display;Desktop" -InfoPage="Display;Multi-Monitor" -InfoPage="Display;Video Modes" -InfoPage="Display;OpenGL" -InfoPage="Display;GPGPU" -InfoPage="Display;Mantle" -InfoPage="Display;Vulkan" -InfoPage="Display;Fonts" -InfoPage="Multimedia;Windows Audio" -InfoPage="Multimedia;PCI / PnP Audio" -InfoPage="Multimedia;HD Audio" -InfoPage="Multimedia;OpenAL" -InfoPage="Multimedia;Audio Codecs" -InfoPage="Multimedia;Video Codecs" -InfoPage="Multimedia;MCI" -InfoPage="Multimedia;SAPI" -InfoPage="Storage;Windows Storage" -InfoPage="Storage;Logical Drives" -InfoPage="Storage;Physical Drives" -InfoPage="Storage;Optical Drives" -InfoPage="Storage;ASPI" -InfoPage="Storage;ATA" -InfoPage="Storage;SMART" -InfoPage="Network;Windows Network" -InfoPage="Network;PCI / PnP Network" -InfoPage="Network;RAS" -InfoPage="Network;Net Resources" -InfoPage="Network;IAM" -InfoPage="Network;Internet" -InfoPage="Network;Routes" -InfoPage="Network;IE Cookie" -InfoPage="Network;Browser History" -InfoPage="DirectX;DirectX Files" -InfoPage="DirectX;DirectX Video" -InfoPage="DirectX;DirectX Sound" -InfoPage="Devices;Windows Devices" -InfoPage="Devices;Physical Devices" -InfoPage="Devices;PCI Devices" -InfoPage="Devices;USB Devices" -InfoPage="Devices;Device Resources" -InfoPage="Devices;Input" -InfoPage="Devices;Printers" -InfoPage="Software;Auto Start" -InfoPage="Software;Scheduled" -InfoPage="Software;Installed Programs" -InfoPage="Software;Licenses" -InfoPage="Software;File Types" -InfoPage="Software;Desktop Gadgets" -InfoPage="Security;Windows Security" -InfoPage="Security;Windows Update" -InfoPage="Security;Anti-Virus" -InfoPage="Security;Firewall" -InfoPage="Security;Anti-Spyware" -InfoPage="Security;Anti-Trojan" -InfoPage="Config;Regional" -InfoPage="Config;Environment" -InfoPage="Config;Control Panel" -InfoPage="Config;Recycle Bin" -InfoPage="Config;System Files" -InfoPage="Config;System Folders" -InfoPage="Database;Database Software" -InfoPage="Database;BDE Drivers" -InfoPage="Database;ODBC Drivers" -InfoPage="Database;ODBC Data Sources" diff --git a/setup/windows/cbin/_include/AIDA64/installed_programs.rpf b/setup/windows/cbin/_include/AIDA64/installed_programs.rpf deleted file mode 100644 index 2d79cb30..00000000 --- a/setup/windows/cbin/_include/AIDA64/installed_programs.rpf +++ /dev/null @@ -1 +0,0 @@ -InfoPage="Software;Installed Programs" diff --git a/setup/windows/cbin/_include/AIDA64/licenses.rpf b/setup/windows/cbin/_include/AIDA64/licenses.rpf deleted file mode 100644 index 6ef298f1..00000000 --- a/setup/windows/cbin/_include/AIDA64/licenses.rpf +++ /dev/null @@ -1 +0,0 @@ -InfoPage="Software;Licenses"