add windows HKEY support#35
Merged
Merged
Conversation
Signed-off-by: Tommy Carpenter <9419125+tommyjcarpenter@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new optional configuration section to the JSON schema for describing Windows Explorer right‑click (shell) menu cleanup actions, including registry-based verb disabling and uninstalling AppX/MSIX shell extensions.
Changes:
- Introduces a new top-level
shell_menu_cleanupsection (Windows-only) in the schema. - Adds three new schema definitions to validate COM handler CLSIDs, static verb registry paths, and AppX package name patterns.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…hell_menu_cleanup schema tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new optional
shell_menu_cleanupsection to the config schema for declaring Windows Explorer right-click (shell) menu cleanup state. Windows-only, likefile_associations; it captures the three distinct places a shell verb can hide so they can be cleaned up declaratively rather than by hand.The section nests under a
windowskey and exposes three arrays, one per mechanism:com_handlers_blocked: CLSIDs written as empty REG_SZ value names underHKLM\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked.static_verbs_disabled: registry verb keys that get an emptyLegacyDisableREG_SZ, hiding the verb without deleting the key; treated as already-done when the key is absent on the current machine.appx_packages_removed: wildcard package-name patterns fed toGet-AppxPackage | Remove-AppxPackagefor MSIX-packaged shell extensions.Each entry requires only its identifying field (
clsid/path/name_pattern); an optionalnameis carried for log readability. Every level setsadditionalProperties: false, so a typo'd array key or OS section fails validation rather than being silently skipped, consistent with the rest of the schema.Changes:
bootstrap/schema.py: newshell_menu_cleanuptop-level section plus threedefinitions(shell_menu_com_handler,shell_menu_static_verb,shell_menu_appx_package).tests/test_schema.py: newTestShellMenuCleanupSchemawith positive cases (full and required-only) and negative cases (missing required field, unknown property, unknown OS section).