Path: debloat_components/debloat_execute_raven_scripts.py
This script executes a predefined set of Raven debloat PowerShell scripts, handling logging and user-facing error popups.
Automate execution of Raven-provided debloat scripts for system cleanup and optimization.
Provide clear logging and GUI error notifications when PowerShell scripts fail.
utilities.util_logger for logging events.
utilities.util_powershell_handler for executing PowerShell scripts.
utilities.util_error_popup for displaying error dialogs to the user.
Parameter | Type | Description | Default |
---|---|---|---|
scripts | list | List of PowerShell script filenames to execute. | ["edge_vanisher.ps1", "uninstall_oo.ps1"] |
python debloat_execute_raven_scripts.py
When run, the script iterates over each entry in the scripts list, logs the start of execution, and invokes run_powershell_script. On success, it logs a confirmation. After all scripts run successfully, it logs a final success message.
If a script fails, the exception is caught, an error is logged, and show_error_popup displays an error dialog with the script name and exception details. The script then exits with a non-zero status to prevent further operations.
Executing PowerShell scripts requires appropriate system privileges. Ensure scripts are obtained from trusted Raven Development Team sources to avoid executing malicious code.
Uses logger.info for progress messages like “Executing PowerShell script: edge_vanisher.ps1” and “✔ Successfully executed edge_vanisher.ps1”. Uses logger.error for errors such as “✖ Failed to execute uninstall_oo.ps1: {error}”.
Run the script in a controlled environment (e.g., a virtual machine) and verify logs to confirm each PowerShell script executes correctly. Simulate failure cases by renaming a script to ensure error handling and popups function as expected.
Author: Raven Development Team