2024-09-25 - Version 1.6.1.0

GENERAL
=======
* Enhanced documentation in the source code all over the UDF. 
* Fixed some minor documentation bugs (thanks to user c.haslam)
* Replaced some magic numbers with constants.

FIXED BUGS:
===========
* _TS_TaskPropertiesGet: State $TASK_STATE_READY was processed like state $TASK_STATE_QUEUED due to an copy&paste error (thanks to user c.haslam).

NEW FUNCTIONS:
==============
* _TS_IsRunFromTaskScheduler: This former experimental function has been renamed to _TS_IsRunFromTS for better readability.
  The new function is now part of the full UDF and does not need to be anabled before using.
  It no longer uses _WinAPI_GetParentProcess but WMI which leads to smaller code (ssaved 1500 lines of code).
  An example script has been added as well.

CHANGED FUNCTIONS
=================
* _TS_TaskExportXML: Now returns @error = 1503 when there is an error creating the XML object.
* _TS_TaskImportXML: Now returns @error = 1705 when $vXMLInput does not exist or there was an error reading the file.

-------------------------------------------------------------------------------------------------------------------------------
2022-07-27 - Version 1.6.0.1

CHANGED FUNCTIONS
=================
* _TS_TaskPropertiesSet: Now returns @error = 2005 when a problem occurs: "Error setting a property. 
  @extended is set to the COM error and the Returnvalue holds the negative index of the property in error ($aProperties)"

-------------------------------------------------------------------------------------------------------------------------------
2021-11-19 - Version 1.6.0.0

DOCUMENTATION
=============
I have been able - based on the great work done by MrCreatoR! - to generate a single CHM file for the TaskScheduler UDF.
This help file looks like the AutoIt help file - unfortunately you can't call this help from SciTE yet.
All other help files (_TS_*.htm, TaskScheduler.htm, default.css) have been removed.

CHANGED FUNCTIONS
=================
* _TS_Close: I noticed that function _TS_Close does not close the connection to the Task Scheduler Service. You now have to pass 
  the object returned by _TS_Open. So the connection will be properly closed by _TS_Close.
  THIS IS A SCRIPT BREAKING CHANGE!

NEW FUNCTIONS
=============
* _TS_IsRunFromTaskScheduler: Check if process is run by Task Scheduler. 
  This function written by mLipok is EXPERIMENTAL!
  To use this function uncomment the following lines:
    ; #include <WinAPIProc.au3>  REMOVE THIS COMMENT TO USE FUNCTION _TS_IsRunFromTaskScheduler - EXPERIMENTAL!
    #cs REMOVE THIS COMMENT TO USE THIS FUNCTION
    #ce REMOVE THIS COMMENT TO USE THIS FUNCTION

-------------------------------------------------------------------------------------------------------------------------------
2021-04-15 - Version 1.5.3.0

GENERAL
=======
* Replaced magic numbers with constants

DOCUMENTATION
=============
* Fixed a few documentation bugs and typos. Extended documentation.

-------------------------------------------------------------------------------------------------------------------------------
2020-11-13 - Version 1.5.2.0

CHANGED FUNCTIONS
=================
* _TS_ErrorText: Now in addition to the errors of TaskScheduler UDF functions returns the text for the HRESULT values of the Task Scheduler API calls.

-------------------------------------------------------------------------------------------------------------------------------
2019-12-03 - Version 1.5.1.0

GENERAL
=======
Removed the #AutoIt3Wrapper_AU3Check* directives as they would force the WHOLE script to adhere to.

FIXED BUGS
==========
* _TS_TaskUpdate: Didn't work. Had to add a third parameter ($oTaskDefinition)

-------------------------------------------------------------------------------------------------------------------------------
2019-11-27 - Version 1.5.0.0

DOCUMENTATION
=============
* Fixed a few documentation bugs and typos.

FIXED BUGS
==========
* _TS_TaskPropertiesGet: The first Action object was correctly listed as "ACTION", all other Actions as "REPETITION".
* _TS_TaskPropertiesSet: The Repetition object was not correctly set.

NEW FUNCTIONS
=============
* _TS_TaskUpdate: Updates a Task after it has been modified (is a stripped down version of _TS_TaskRegister)

-------------------------------------------------------------------------------------------------------------------------------
2019-11-20 - Version 1.4.0.0

CHANGED FUNCTIONS
=================
* _TS_ErrorText: New parameter added to just return the pure error text without function name and error number.
* _TS_ActionCreate: No longer accepts the Task object or Task path. You need to pass the TaskDefinition object. 
  First parameter $oService has been dropped as it is no longer used. SCRIPT BREAKING CHANGE!!
* _TS_ActionDelete: No longer accepts the Task object or Task path. You need to pass the TaskDefinition object. 
  First parameter $oService has been dropped as it is no longer used. SCRIPT BREAKING CHANGE!!
* _TS_TaskGet: Now allows to return the Task or TaskDefinition object of the specified task.
* _TS_TaskPropertiesGet: If you specify a single property in $sQueryProperties then the function returns just the property value as a string.
* _TS_TaskRegister: Now allows to update a Registered Task by setting the $iCreateFlag parameter. Default is to create a new task.
  If the logon type has been set in the Principal sub-object then $TASK_LOGON_NONE is the default to not overwrite the existing setting.
  Else $TASK_LOGON_INTERACTIVE_TOKEN will be used as default.
* _TS_TriggerCreate: No longer accepts the Task object or Task path. You need to pass the TaskDefinition object. 
  First parameter $oService has been dropped as it is no longer used. SCRIPT BREAKING CHANGE!!
* _TS_TriggerDelete: No longer accepts the Task object or Task path. You need to pass the TaskDefinition object. 
  First parameter $oService has been dropped as it is no longer used. SCRIPT BREAKING CHANGE!!
* _TS_Wrapper_TaskRegister: Is now an alias for _TS_TaskRegister

NEW FUNCTIONS
=============
* _TS_TaskValidate: Validates a Task or Task Definition and returns error, warning and information messages in an array.
  Still not complete but should be used to check for a correct Task befor calling _TS_TaskRegister.
 
-------------------------------------------------------------------------------------------------------------------------------
2019-11-07 - Version 1.3.0.0

CHANGED FUNCTIONS
=================
* _TS_TaskCopy: No longer creates the Task but returns the Task Definition object. So you can make further modifications and then
  use _TS_TaskRegister to register the Task. Mandatory Parameter 3 ($sTargetTaskPath) has been dropped.
  This is necessary because a copied Task does not hold the password which is set when the source Task is registered.
  SCRIPT BREAKING CHANGE!!
* _TS_TaskImportXML: No longer creates the Task but returns the Task Definition object. So you can make further modifications and then
  use _TS_TaskRegister to register the Task. Mandatory Parameter 2 ($sTaskPath) has been dropped.
  This is necessary because an imported Task does not hold the password which is set when the source Task is registered.
  SCRIPT BREAKING CHANGE!!

-------------------------------------------------------------------------------------------------------------------------------
2019-11-05 - Version 1.2.1.0

CHANGED FUNCTIONS
=================
* _TS_TaskPropertiesGet: You can now retrieve all or specified properties of a Task/TaskDefinition or an subobject like
  TASK, DEFINITION, ACTIONS, ATTACHMENTS, HEADERFILES, PRINCIPAL, REGISTRATIONINFO, SETTINGS, IDLESETTINGS, NETWORKSETTINGS, TRIGGERS, REPETITION

-------------------------------------------------------------------------------------------------------------------------------
2019-11-03 - Version 1.2.0.0

GENERAL
=======
* All example functions have been modified to display the full error text (_TS_ErrorText)

NEW FUNCTIONS
=============
* _TS_ErrorText: Returns the full error message text for an error number

-------------------------------------------------------------------------------------------------------------------------------
2019-10-27 - Version 1.1.0.0

NEW FUNCTIONS
=============
* _TS_TaskRun: Runs the Registered Task immediately.
* _TS_TaskStop: Stops all instances of the Registered Task immediately.

-------------------------------------------------------------------------------------------------------------------------------
2019-10-26 - Version 1.0.0.0

GENERAL
=======
* Added/modified example scripts

CHANGED FUNCTIONS
=================
* _TS_TaskPropertiesGet: Now allows to query properties of a Task Definition object as well

DOCUMENTATION
=============
* Fixed a few documentation bugs. Enhanced function and error documentation all over the place

-------------------------------------------------------------------------------------------------------------------------------
2019-09-09 - Version 0.9.0.0

GENERAL
=======
* Code optimization and enhanced error checking all over

FIXED BUGS
==========
* _TS_TaskPropertiesGet: Didn't properly export XML data. Did not properly handle @LF in exported properties

CHANGED FUNCTIONS
=================
* _TS_TaskPropertiesSet: The index of the input record for an invalid property gets returned in @extended

DOCUMENTATION
=============
* Enhanced function and error documentation all over the place

-------------------------------------------------------------------------------------------------------------------------------
2019-09-30 - Version 0.8.0.0

GENERAL
=======
* Code optimization and enhanced error checking all over

NEW FUNCTIONS
=============
* _TS_RunningTaskList: Returns a list of all currently running Tasks

DOCUMENTATION
=============
* Enhanced function and error documentation all over the place

-------------------------------------------------------------------------------------------------------------------------------
2019-09-23 - Version 0.7.0.0

GENERAL
=======
* Code optimization and enhanced error checking all over

NEW FUNCTIONS
=============
* _TS_ActionCreate: Create a new Action object for an existing Task or a Task Definition
* _TS_ActionDelete: Delete a single or all Action objects by ID or index
* _TS_TriggerDelete: Delete a single or all Trigger objects by ID or index

DOCUMENTATION
=============
* Enhanced function and error documentation all over the place

-------------------------------------------------------------------------------------------------------------------------------
2019-09-21 - Version 0.6.0.0

GENERAL
=======
* Code optimization and enhanced error checking all over

NEW FUNCTIONS
=============
* _TS_TaskListHeader: 

CHANGED FUNCTIONS
=================
* _TS_TaskList: Returns a list of all tasks in a given taskfolder and all subfolders.
  Allows to ignore all tasks in the Microsoft folder, all hidden or disabled tasks.
  Allows to select the task properties to get returned. See function _TS_TaskListHeader which returns a description of all selected properties as header for _ArrayDisplay.
  Allows to return data in a more readable format (e.g. "Ready" for status 3).

DOCUMENTATION
=============
* Enhanced function and error documentation all over the place

-------------------------------------------------------------------------------------------------------------------------------
2019-09-14 - Version 0.5.0.0

GENERAL
=======
* Code optimization all over

NEW FUNCTIONS
=============
* _TS_TaskCopy: Copy a task to the same folder with a different name or a different folder with the same or a different name
* _TS_TaskDelete: Delete a Task from the specified Task Folder
* _TS_TriggerCreate: Create a trigger object for a task
* _TS_TaskRegister: Register a task created by _TS_TaskCreate in the specified folder.
* _TS_Wrapper_ActionCreate: Create the actions to be executed when the task runs
* _TS_Wrapper_PrincipalSet: Set the Principal properties of a Task Definition object
* _TS_Wrapper_TaskCreate: Create a Task Definition object so you can then set all needed properties using other Wrapper functions
* _TS_Wrapper_TaskRegister: Register a task created by _TS_TaskCreate in the specified folder
* _TS_Wrapper_TriggerDateTime: Creates a date/time based trigger
* _TS_Wrapper_TriggerLogon: Creates a logon trigger

REMOVED FUNCTIONS
=================
* _TS_WrapperDateTime: Split into multiple _TS_Wrapper* functions plus _TS_WrapperTriggerDateTime
* _TS_WrapperLogon: Split into multiple _TS_Wrapper* functions plus _TS_WrapperTriggerLogon

DOCUMENTATION
=============
* Enhanced function and error documentation all over the place

-------------------------------------------------------------------------------------------------------------------------------
2019-09-07 - Version 0.4.0.0

GENERAL
=======
* Code optimization all over

NEW FUNCTIONS
=============
* _TS_TaskCreate: Create a Task Definition object so you can then set all needed properties using _TS_TaskPropertiesSet
* _TS_TaskPropertiesSet: Sets the properties of a tasks object (Task Definition, RegisteredTask, Action or Trigger)
* _TS_TaskRegister: Register a task created by _TS_TaskCreate in the specified folder

CHANGED FUNCTIONS
=================
* _TS_TaskPropertiesGet: Now supports 3 different output formats:
  1 - User friendly format. 2D array including comments
  2 - Format you can use as input to _TS_TaskPropertiesSet (just the content of the array)
  3 - Format you can use as input to _TS_TaskPropertiesSet (full AutoIt syntax to define the array - without XML and written to the console)
  In addition you can ignore properties without a value

DOCUMENTATION
=============
* Enhanced function and error documentation all over the place

-------------------------------------------------------------------------------------------------------------------------------
2019-09-06 - Version 0.3.0.0

GENERAL
=======
* Enhanced Au3Check parameters (#AutoIt3Wrapper* directives)
* Code optimization all over

NEW FUNCTIONS
=============
* _TS_FolderGet: Returns the object of the specified folder
* _TS_TaskExportXML: Returns the XML representation of a single task and writes it to a file or returns it in an array
* _TS_TaskImportXML: Imports a task from an XML file or an array

DOCUMENTATION
=============
* Enhanced function and error documentation all over the place

-------------------------------------------------------------------------------------------------------------------------------
2019-09-02 - Version 0.2.0.0

GENERAL
=======
* Constants used in the UDF have been added
* code optimization all over

NEW FUNCTIONS
=============
_TS_WrapperDateTime: Wrapper to facilitate the creation of date/time based tasks

CHANGED FUNCTIONS
=================
* _TS_TaskPropertiesGet: Output format of the array changed (as described in the forum thread)

DOCUMENTATION
=============
* Enhanced function and error documentation all over the place

-------------------------------------------------------------------------------------------------------------------------------
2019-07-29 - Version 0.1.1.0

GENERAL
=======
* Code cleanup: Removed unneeded variables, added parameters for strict AU3Check

CHANGED FUNCTIONS
=================
* _TS_FolderExists: "folder not found" raises a general error so the check was rewritten. This allows to handle all other exceptions
  as real errors. 

DOCUMENTATION
=============
* Enhanced function and error documentation all over the place.

-------------------------------------------------------------------------------------------------------------------------------
2019-07-28 - Version 0.1.0.0 - INITIAL RELEASE

GENERAL
=======
First ALPHA version of the UDF.

NEW FUNCTIONS
=============
* _TS_Open: Create Task Scheduler object and connect to the Task Scheduler Service - even on another device
* _TS_Close: Close the Connection and do some cleanup
* _TS_ErrorNotify: COM error handling
* _TS_FolderCreate: Create a Folder where to store Tasks
* _TS_FolderDelete: Delete a Task Folder
* _TS_FolderExists: Check if a Task Folder exists
* _TS_TaskExists: Checks if a Task exists
* _TS_TaskGet: Retrieve the object of a single Task
* _TS_TaskList: Get a list of Tasks in a Folder
* _TS_TaskPropertiesGet: Extract all Properties of a Task and return them in different formats (partially Done)