1
votes

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

https://docs.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.

1
That may be by design. The toast is probably not running at the same security level at the app. What do you mean by "cannot access the parent program". What kind of code do you use?Simon Mourier
This is the minimum configuration source that can reproduce the phenomenon. dropbox.com/s/pdyhasaxpbi50d2/TEST_Toast.zip?dl=1 DesktopToastsSetupProject \ bin \ Debug \ DesktopToastsSetupProject.msi Please execute first and register the shortcut. If you do not install it will not work properly with Windows specifications. For more information docs.microsoft.com/en-us/windows/uwp/design/shell/… please look at.S.VR
Yes, I think it's by design, for security reasons. Although the COM Server is registered as MultiUse, COM has to start another process so they run with a compatible security token. The notification cannot communicate with the initial process since notifications don't run as admin.Simon Mourier
The full code sample of GitHub (WPF App) can be executed normally even if it is running as an administrator. github.com/WindowsNotifications/desktop-toasts This problem occurs when implementing in Win32 Is the toast notification side specification?S.VR
I actually tested the WPF app and it does exactly the same. If you run it as admin and click on the View toast, it launches a second process.Simon Mourier

1 Answers

0
votes

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.