[英]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...) 您必须将计划任务选项更改为“仅在用户登录时运行”(有意义...)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.