optimizer
optimizer copied to clipboard
CN.1875084792839892:8317d16c0ed1155690df33c6a3126fdb_6929784fe24155862d2e9e27.69298e36e24155862d2e9e53.69298e3644a3e733aaa06252:Trae CN.T(2025/11/28 19:57:42)feat: implement automatic granular registry backup mechanism
Summary: Introduced a safety interception layer for registry modifications to prevent data loss. The system now automatically exports the target registry key to a .reg file before applying any tweaks.
Details:
- Implemented
Utilities.BackupRegistryKey: Usesreg.exe exportto save the current state of a key to the localBackupsdirectory with sanitized filenames. - Added
Utilities.SetRegistryValue: A wrapper method that enforces the "backup-then-write" pattern, ensuring no registry value is changed without a prior backup. - Refactored
OptimizeHelper.cs: Replaced all directRegistry.SetValuecalls with the newUtilities.SetRegistryValuewrapper to integrate the backup logic across all performance tweaks. - Fixed compilation errors in
Utilities.csregarding missing context and method visibility.