How to register your app in the Notifications and Actions Center of Windows 11
I am developing an app (it's a normal GUI app written in DART and C++). It is NOT a packaged UWP app.
I am able to show the app's item/entry in the Windows 11 Notifications and Actions center by writing this .iss innosetup script:
[Registry]
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\{#AppId}"; ValueName: "Enabled"; ValueType: dword; ValueData: 0; Flags: uninsdeletekey
[Icons]
Name: "{autoprograms}\{#App}"; Filename: "{app}\{#AppExe} "Name: "{autodesktop}\{#App}"; Filename: "{app}\{#AppExe}"; Tasks: desktopiconName: "{commonstartmenu}\Programs\{#App}"; Filename: "{app}\{#AppExe}"; AppUserModelID: "{#AppID}"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Based on this code, here's how I could display my app's entry/item in the Notifications and Actions center:
But, the toggle button does not work at all :(
When I click on the toggle button to enable the notifications for my Core Dev app, it does not turn ON. It remains OFF only.
I read over internet and tried to create a COM server dll, register that dll, created registry keys from my COM server dll:
SoftwareClassesCLSID{95DA8DD5-7867-4A94-AAEC-FC363363C04A}
SoftwareClassesCLSID{95DA8DD5-7867-4A94-AAEC-FC363363C04A}InProcServer32 (having path of the COM Server dll)
But, then also the toggle button does not work at all.
I read at many places that the AppUserModelID should be consistent and unique across all the registry keys for the toggle button to work. I confirmed that as well and it was unique and consistent already.
But still, nothing works :(
Could you please guide me through all the required steps that I need to execute/perform in order to get my app's entry in the windows Notifications and Actions center with a working toggle button so that users can enable/disable the settings for it ?