scheduled tasks registry settings

i want to enable or disbale a scheduled task using registry keys.  How can i do this.
ServiceOpsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hlarseCommented:
Hi ServiceOps,

Task definitions and schedules are actually stored in a binary .job file, located in c:\windows\tasks.  Since this is the case, it is not possible to edit the registry to enable/disable a task.

Have you tried the schtask command?  Take a look at http://msdn2.microsoft.com/en-us/library/bb736357(VS.85).aspx, specifically the /change section.
0
souseranCommented:
Task Scheduler options are stored in the registry

HKLM\SOFTWARE\Microsoft\SchedulingAgent\
0
souseranCommented:
However, hlarse is correct that the task *definitions* are not.
0
ServiceOpsAuthor Commented:
souseran

i guess "enabling the task" is part of the "definitions" because i can't see that in the registry
0
hlarseCommented:
ServiceOps

You can get around this by running the following commands:
to enable - schtasks /change /TN taskname /ENABLE
to disable - schtasks /change /TN taskname /DISABLE

Is there a particular reason that this must be a registry edit?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Utilities

From novice to tech pro — start learning today.