我如何绕过焦点帮助的提示消息警报设置?

问题描述

我已经在Windows 10中创建了一个自定义祝酒消息,即使将焦点辅助设置设置为“仅限警报”,我也需要显示该消息。似乎在Windows更新中,当应用程序进入全屏,复制显示或玩游戏时,认情况下设置了“仅限警报”设置。我需要一种绕过“仅限警报”设置或通过脚本禁用焦点辅助的方法

我试图更改组策略中的设置,如下所示: Manage Focus Assist on Windows 10

,以及通过注册表查看,如下所示: How to Change Windows 10 Quiet Hours (Focus Assist) Automatic Rules

这两种方法似乎都不起作用。下面是我的Powershell脚本,用于创建Toast消息:

param(
[String] $Msg1,[String] $logo1
)
function test
{
    [void][Windows.UI.Notifications.Toastnotificationmanager,Windows.UI.Notifications,ContentType = WindowsRuntime]
    [void][Windows.UI.Notifications.ToastNotification,ContentType = WindowsRuntime]
    [void][Windows.Data.Xml.Dom.XmlDocument,Windows.Data.Xml.Dom.XmlDocument,ContentType = WindowsRuntime]

$App_ID = 'windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel'

$template = @"
<toast scenario="alarm">
    <visual>
        <binding template="ToastGeneric">
            <text id="1">$("$Msg1")</text>
            <image placement="applogoOverride" src="$logo1"/>
        </binding>
    </visual>
</toast>
"@
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($template)
$test = New-Object Windows.UI.Notifications.ToastNotification $xml
[Windows.UI.Notifications.Toastnotificationmanager]::CreatetoastNotifier($APP_ID).Show($test)
}

if ($Msg1) {test}

应该通过运行传递-Msg1'This is a test'的脚本来显示Toast消息。相反,它不会显示,只能在操作中心看到。

无论聚焦辅助(安静时间)设置如何,有人能够显示敬酒通知吗?还是有人知道通过似乎有效的脚本来禁用焦点辅助的方法(这需要在没有用户交互的情况下完成)?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)