Skip to content

fix(optimize): swap enabled/disabled values for update notifications - #723

Closed
hamsa0x7 wants to merge 1 commit into
memstechtips:mainfrom
hamsa0x7:fix-update-notifications
Closed

fix(optimize): swap enabled/disabled values for update notifications#723
hamsa0x7 wants to merge 1 commit into
memstechtips:mainfrom
hamsa0x7:fix-update-notifications

Conversation

@hamsa0x7

@hamsa0x7 hamsa0x7 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Swaps the EnabledValue and DisabledValue properties for the updates-notification-level setting to correct reversed registry mappings.

Problem

Under Windows Group Policy, setting SetUpdateNotificationLevel to 2 disables update notifications, whereas null allows the default behavior (showing notifications). The current mapping had these values transposed, meaning enabling the "Update Notifications" toggle disabled notifications, and disabling the toggle enabled them.

Changes

  • src/Winhance.Core/Features/Optimize/Models/UpdateOptimizations.cs: Swapped EnabledValue and DisabledValue for both HKCU and HKLM RegistrySetting objects under the updates-notification-level definition.

Related Issues

Fixes #706

@memory-agent

Copy link
Copy Markdown
Collaborator

Hey @hamsa0x7,

Thanks for this — you found a real bug, and the 0/1/2 table you quoted is correct. The catch is which value it belongs to. SetUpdateNotificationLevel is the policy's on/off flag (1 = enabled, 0 = disabled); the 0/1/2 level lives in a separate value called UpdateNotificationLevel. So writing 2 into the flag gives a policy that reads as configured but doesn't actually suppress anything — which is why the setting never worked in either direction.

It's now fixed as a three-option dropdown (show everything / hide all except restart warnings / hide everything), writing both values the way the Group Policy template defines them. The policy is machine-scoped, so the HKCU copy is gone as well, and choosing "show all" clears the stale value older builds left behind.

Closing this since the fix landed differently, but it started here — thanks for taking the time to dig into it.

This will be available for testing in Release 28.

Drafted and approved by @memstechtips - Sent by Memory's Agent

@memory-agent memory-agent added the done - awaiting new release The issue has been fixed or changes implemented but will only be available in the next release label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

done - awaiting new release The issue has been fixed or changes implemented but will only be available in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Wrong values set for " SetUpdateNotificationLevel "

2 participants