def list_tasks(location='\\'):
 pythoncom.CoInitialize()
 task_service = win32com.client.Dispatch('Schedule.Service')
 task_service.Connect()
 task_folder = task_service.GetFolder(location)
 tasks = task_folder.GetTasks(0)
 ret = []
 for task in tasks:
  ret.append(task.Name)
 return ret

def list_tasks ( location = '\\' ) : pythoncom . CoInitialize ( ) task_service = win32com . client . Dispatch ( 'Schedule.Service' ) task_service . Connect ( ) task_folder = task_service . GetFolder ( location ) tasks = task_folder . GetTasks ( 0 ) ret = [ ] for task in tasks : ret . append ( task . Name ) return ret
list all tasks located in a specific location in the task scheduler .