简体   繁体   English

在W10中登录时从计划任务启动时,WPF应用程序任务栏图标未显示

[英]Wpf app taskbar icon not showing when launched from scheduled task at login in W10

I have a wpf app with the main form hidden, only a taskbar icon to interact with. 我有一个隐藏主窗体的wpf应用程序,只有一个与之交互的任务栏图标。 It works fine, i mean, exe double-click icon appears, interact, close... On Windows 7 also works without any issue. 它运行正常,我的意思是,exe双击图标出现,进行交互,关闭...在Windows 7上也可以正常运行。

Here the weird thing... If i create a scheduled task to launch it on user login, it works only in W7, in Windows 10 the icon is hidden. 这很奇怪...如果我创建了计划任务以在用户登录时启动它,则该任务仅在W7中有效,在Windows 10中该图标被隐藏。

I know that the app is running and doing stuff because of the implemented log. 我知道该应用程序正在运行并且正在执行操作,因为已实现了日志。

By the way, i'm using Harcodet taskbar declared in xaml this way: 顺便说一句,我使用在xaml中声明的Harcodet任务栏是这样的:

<tb:TaskbarIcon x:Name="TBIcon"
    IconSource="{Binding ViewModel.Status, Converter={StaticResource TaskBarIconConverter}}"
    ToolTipText="{Binding ViewModel.TbIconToolTip, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
...

Windows version is 10.0.16299.64 Windows版本是10.0.16299.64

Any help? 有什么帮助吗?

UPDATE: 更新:

任务

You have to change the scheduled task option to "Run only when user is logged on" (makes sense...) 您必须将计划任务选项更改为“仅在用户登录时运行”(有意义...)

You have to change the scheduled task option to "Run only when user is logged on" (for W7 and W10) in the general tab of the task: 您必须在任务的常规选项卡中将计划任务选项更改为“仅在用户登录时运行”(对于W7和W10):

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM