New
#1
Turning off notifications Settings > System > Notifications & actions
The registry keys for each of the notifications in the above settings page are located at HKEY_CURRENT_USER\Control Panel\Quick Actions\Pinned.
Each notification adds a separate string value for the notification.
Turning the notification off deletes the key.
The notifications could be enabled/disabled in any order and there is an unknown number of them on any given PC.
So I figured deleting HKEY_CURRENT_USER\Control Panel\Quick Actions\Pinned and then recreating it would do the job. It didn't. It breaks the functionality completely. From that point on you can only have one notification enabled at any one time.
Now, given I want to turn them all off that might not seem to be an issue, unless a user specifically wants to re-enable some of them at a later point. Plus, I'd rather not "break" windows.
I could just go through a loop and just individually delete keys up to a specified number... 20 or so seems safe. That will probably result in some errors when a key is not found. That's not very elegant.
If there a better way to do this (Other than "don't do it")?
Thanks