Add system-wide policies to disable update checks #3313
+179
−1
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.
Changes proposed in this pull request
PolicyManagerandPolicyInfoclasses to load system-wide policies fromconfig.jsonin the application directoryUpdate_DisableUpdateCheckoption to disable update checks for all users on a machineSettingsManager.Load()flowPolicyManager/PolicyInfoto avoid naming conflicts with existingConfigurationManagerclassRelated issue(s)
Related to enterprise deployment requirements for centralized update control.
Copilot generated summary
Copilot summary
Implements a system-wide policy mechanism similar to Firefox's logprefs pattern. When
config.jsonexists in the application directory with"Update_DisableUpdateCheck": true, all users on that machine will have update checks disabled regardless of their personal settings.Architecture:
PolicyManager.Load()runs before user settings loadSettingsManager.ShouldCheckForUpdatesAtStartupproperty checks system-wide policies first, then falls back to user preferencePolicyManager/PolicyInfoto avoid confusion with existingConfigurationManagerUsage:
Place
config.jsonin application installation directory:{ "Update_DisableUpdateCheck": true }Files Modified:
PolicyInfo.cs,PolicyManager.cs- Policy model and loaderSettingsManager.cs- Integrated policy loading, added precedence logicMainWindow.xaml.cs- Updated to respect system-wide policiesTo-Do
Contributing
By submitting this pull request, I confirm the following:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.