This project has moved and is read-only. For the latest updates, please go here.

return a value from an .exe to a task

May 19, 2015 at 11:06 AM
is it possible return a value during the "running" state of scheduled task from an .exe?

A sort of notification (the precentage of completion e.g.)...
Does exist a way to do that in order to get that value into the Task object?
Coordinator
May 19, 2015 at 5:10 PM
There is not a way to expose anything from an .exe except for the final result code. If you need to expose in-process information, check out the COMHandlerAction which allows you to write custom code that gets run in-process as a COM object to the Task Scheduler. In the Downloads section, there is a project template to help you write one.
May 19, 2015 at 9:48 PM
thank you to have driven me on the right path :-)
May 20, 2015 at 3:00 PM
Edited May 20, 2015 at 3:01 PM
i took a look at the interface "ITaskHandler" and it has only these methods:

-Pause: Called to pause the COM handler.
-Resume: Called to restart the COM handler.
-Start: Required. Called to start the COM handler.
-Stop: Required. Called to stop the COM handler.

i would need something that should be fired continuously, a sort of "notify" event.
Do you think is it possible using any "workaround" to simulate this behaviour?
any ideas?
Coordinator
May 20, 2015 at 7:09 PM
You will want to use the ITaskHandlerStatus interface to communicate back.
Marked as answer by dahall on 9/1/2015 at 9:59 AM