def schtask_com():
'''
Written by Honglei Jiang. Modified from corresponding VB version.
参考资料:
* Advanced Python and COM
http://oreilly.com/catalog/pythonwin32/chapter/ch12.html
* Using the Task Scheduler
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384006(v=VS.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383507(v=VS.85).aspx
* Starting an Executable at a Specific Time
http://msdn.microsoft.com/en-us/library/windows/desktop/aa382152(v=VS.85).aspx
'''
import win32com.client, sys
#A constant that specifies a time-based trigger.
TriggerTypeTime = 1
#A constant that specifies an executable action.
ActionTypeExec = 0
#********************************************************
# Create the TaskService object.
service = win32com.client.Dispatch("Sche