使用C#在任务计划程序中禁用/启用任务 [英] Disable/enable tasks in task scheduler using c#

查看:122
本文介绍了使用C#在任务计划程序中禁用/启用任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何在控制面板->中禁用/启用计划的任务? 任务计划程序.我仅在Windows XP平台上寻找解决方案.

C#中是否有可用的命名空间?但是,我的想法是使用 WMI Win32_Scheduledjobs .但是, win32_scheduledjobs 不能控制使用 Task Scheduler GUI创建的计划任务.

据我所知,不是使用.NET 2.0访问相同内容的直接方法.是否有使用3.0/3.5的解决方案?

提前感谢.


有时,可能会遇到困难...

Hi,

How can disable/enable the scheduled tasks in my Control Panel -> Task Sceduler. I'm looking for a solution in windows xp platform only.

Is there any namespace available in C#? However, my idea was to use Win32_Scheduledjobs of WMI. But, win32_scheduledjobs does not control the scheduled tasks that are created using the Task Scheduler GUI.

To the best of my understanding, there is not direct way to access the same using .NET 2.0. Is there any soluton using 3.0/3.5?

Thanks in advance.


Sometimes, Difficult things are possible...

推荐答案

看看这个:

http://www.codeproject .com/KB/cs/tsnewlib.aspx

谢谢
Have a look at this:

http://www.codeproject.com/KB/cs/tsnewlib.aspx

Thanks


这篇关于使用C#在任务计划程序中禁用/启用任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆