简体   繁体   English

如何在 C# 中启动“计划任务向导”?

[英]How to start the 'Scheduled Task Wizard' in C#?

I'd like to start the 'Scheduled Task Wizard' from the click of a button in my C# project.我想通过单击我的 C# 项目中的按钮来启动“计划任务向导”。 Anyone have any idea how to do this?任何人都知道如何做到这一点?

Note: I am not interested in creating/starting or stopping a task programatically, I just want to start the wizard and/or the Scheduled Tasks folder and/or both.注意:我对以编程方式创建/启动或停止任务不感兴趣,我只想启动向导和/或计划任务文件夹和/或两者。

I apologize if this has been answered before but I couldn't find it.如果之前已经回答过这个问题,我很抱歉,但我找不到它。

You can probably use the Process.Start method to kick off the following command:您可能可以使用Process.Start方法来启动以下命令:

%SystemRoot%\system32\taskschd.msc /s

The closest you can get is control schedtasks , but it won't open the actual wizard, just the scheduled tasks list.您可以获得的最接近的是control schedtasks ,但它不会打开实际的向导,只会打开计划任务列表。

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

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