Skip to content

Commit

Permalink
win: unify registry data setting, fix #380
Browse files Browse the repository at this point in the history
This commit unifies and centralizes registry data operations. This
improves reliability and robustness by avoiding bugs caused by incorrect
syntax when making modifications, as operations are now centralized.
This change resolves issue #380.

It also enhances reversibility by adding all missing revert codes and
correcting existing revert codes, tested against default values on fresh
OS and software installations.

Key changes:

- Add ability to revert to OS default data in `SetRegistryValue`
- Refactor manual registry operations to use shared functions
- Improve documentation for some affected scripts
- Fix incorrect revert codes (adding value instead of deleting) for some scripts
- Add missing revert logic for affected scripts

Other supporting changes:

- Fix revert code generation in `SetRegistryValueAsTrustedInstaller` to
  avoid generating empty revert code when no actions are needed.
- Add ability to delete keys on revert in `CreateRegistryKey`.
- Change `HKCR` key modifications to `HKLM|HKCU\Software\Classes` keys
  to always generate correct revert logic.
  • Loading branch information
undergroundwires committed Aug 9, 2024
1 parent c2f4b68 commit 4cea6b2
Showing 1 changed file with 1,286 additions and 554 deletions.
Loading

0 comments on commit 4cea6b2

Please sign in to comment.