Path: /debloat_components/debloat_registry_tweaks.py
This script applies a predefined set of Windows Registry modifications to optimize various system and UI settings for performance, usability, and a consistent dark theme.
Automate disabling of context menu delay, animation, and Game DVR features during a Windows debloat process.
Enforce dark theme for both applications and system UI, and adjust advanced Explorer behaviors such as taskbar alignment and file extension visibility.
Python standard library winreg module
Raven Development Team utilities: util_logger, util_error_popup, and util_modify_registry
Parameter | Type | Description | Default |
---|---|---|---|
None | N/A | No user-configurable parameters; all tweaks are hard-coded. | N/A |
python debloat_registry_tweaks.py
On execution, the script defines a list of registry changes—each a tuple of hive, key path, value name, registry data type, and the desired value. It iterates through the list, invoking set_value for each entry. Successful applications log an INFO message; after all entries, a final INFO confirms completion.
If set_value raises an exception for any tweak, the script logs an ERROR, displays a blocking error popup via show_error_popup, and exits immediately with a non-zero status to prevent partial application.
Modifying HKLM and HKCU registry hives requires appropriate user privileges (typically administrative). All values are predefined, preventing injection risks. Ensure the script runs under a secure, elevated context.
Uses util_logger at levels INFO and ERROR. Example messages:
INFO: “Applying registry tweak: Software\...\Advanced\TaskbarAl = 0 (type=REG_DWORD)”
ERROR: “Failed to apply registry tweak HideFileExt: [WinError ...]”
Manually run on a test VM and verify each registry value via regedit or PowerShell Get-ItemProperty
. Unit tests can mock util_modify_registry.set_value to assert correct calls for all defined entries.
Author: Raven Development Team