Skip to content

Enhancement: Implement automatic registry rollback on execution failure #612

Description

@HetCreep

Currently, if the script fails or encounters an unhandled exception during the execution of debloat parameters, the registry is left in a partially modified, inconsistent state.

This enhancement wraps the execution loop in a try-catch block. If an execution failure occurs, the script automatically loads the pre-execution registry backup (created via New-RegistrySettingsBackup) and restores the registry to its original state, ensuring transactional integrity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions