There is so many ways to do this
1) Run program_1 with command line and pass something like
A) Window
handle for message back
B) Named or Unnamed Pipe
C) A file with path with shared write and read protection and pull status on it
...
TCP ?!
Any Inter Process Communication
IPC .
2) Hardcode the above in program_1 and _2
3) CreateProcess and use timer with GetExitCodeProcess
https://learn.microsoft.com/en-us/wi...xitcodeprocess to know if _1 is finished.
....
If you can hardcoded then it is the best, but GetExitCodeProcess is my preferred method to check without blocking on not-my-own applications.