首页 > 解决方案 > How to disable task from windows task scheduler via python script

问题描述

I want to disable GoogleUpdateTaskMachineUA task from windows task scheduler via python script. Here's the image of Disable option button in task scheduler

I tried using subprocess:

p = subprocess.Popen(['schtasks.exe', '/Change', '/TN', 'GoogleUpdateTaskMachineUA',
                      '/DISABLE'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)

But, it didn't work out. Is there any way to do it?

标签: pythonscheduled-taskstaskschedulerwindows-task-scheduler

解决方案


推荐阅读