gpt4 book ai didi

windows - 注销和登录后任务计划程序无法显示应用程序的 GUI(无论用户是否登录都运行)

转载 作者:可可西里 更新时间:2023-11-01 11:11:50 25 4
gpt4 key购买 nike

我有一个 GUI 应用程序,我希望它在重新启动/注销 Windows 计算机后自动运行。

以下是我如何使用 Windows 任务计划程序:

  1. 首先运行命令创建任务:c:\Windows\System32\schtasks.exe/Create/TN taskname/XML taskname.xml/RU username/RP password/IT

  2. 创建任务后,在常规选项卡中,选择了“无论用户是否登录都运行”单选按钮,并且未选中“不存储密码”复选框。在触发器选项卡中,我设置为每 5 分钟重复一次任务。 enter image description here

重新启动计算机后,它可以在 5 分钟内自动触发应用程序运行并显示 GUI。但是,如果我注销再登录电脑,它只会触发应用程序运行而不会显示GUI,我已经等了大约10分钟,我只能在任务管理器中看到应用程序正在运行的进程。除非我手动结束任务然后运行任务,否则它将使用 GUI 运行应用程序。

有谁知道为什么会这样以及如何解决?

谢谢,

最佳答案

这似乎是 Windows 的最新版本的 TaskScheduler 的方式。

根据 Microsoft (强调):

You can specify that a task should run even if the account under which the task is scheduled to run is not logged on when the task is triggered. To do this, select the radio button labeled Run whether user is logged on or not . If this radio button is selected, tasks will not run interactively. To make a task run interactively, select the Run only when user is logged on radio button.

基本上,如果您选择“无论用户是否登录都运行”,该进程将不会启动 UI。

关于windows - 注销和登录后任务计划程序无法显示应用程序的 GUI(无论用户是否登录都运行),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39736810/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com