How can I find the instance / correlation identifier of a scheduled task that started my process

If I have a scheduled Windows task that launches my EXE. is there a way from inside my exe to find the scheduled task instance that called me?

+5
source share
2 answers

The easy answer for this is: no.

The best thing you can do is programmatically access the task scheduler library and see if this process is in "running" mode, get the PID of the process (the scheduler actually records it in its history) and compare it with yours.

, exe ( , exe ).

, , ( NETWORK SERVICE - ), .

+3

- , , API. , PID . 200 (Action Started), - , , , , (, - ), , .)

0

All Articles