def list_actions(name, location='\\'):
 pythoncom.CoInitialize()
 task_service = win32com.client.Dispatch('Schedule.Service')
 task_service.Connect()
 task_folder = task_service.GetFolder(location)
 task_definition = task_folder.GetTask(name).Definition
 actions = task_definition.Actions
 ret = []
 for action in actions:
  ret.append(action.Id)
 return ret

def list_actions ( name , location = '\\' ) : pythoncom . CoInitialize ( ) task_service = win32com . client . Dispatch ( 'Schedule.Service' ) task_service . Connect ( ) task_folder = task_service . GetFolder ( location ) task_definition = task_folder . GetTask ( name ) . Definition actions = task_definition . Actions ret = [ ] for action in actions : ret . append ( action . Id ) return ret
list all actions that pertain to a task in the specified location .