Search code examples
c#comwindows-10toastwin32-process

C# Toast Win32 [Run as administrator] Not work


I built up a toast notification with reference to the following sites.

https://learn.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop

However, when executed as an administrator, can not access the parent program from the toast. It starts up as a new program.

It can be executed with no problems with ordinary users.

The toast implementation is here.

[DesktopNotificationManagerCompat.cs file from GitHub] https://raw.githubusercontent.com/WindowsNotifications/desktop-toasts/master/CS/DesktopToastsApp/DesktopNotificationManagerCompat.cs

I am running as Non-Desktop Bridge.


Solution

  • Even for programs executed as "administrator", toast notification body seems to operate with non-administrator (general user) authority.

    Therefore, from the program "executed as administrator" To access the toast notification issuing program I made a conclusion that I can not do it.