New
#11
I will play with this a bit later, but here's my idea if someone wants to give it a try already:
- Create a PowerShell script
- Start first program:
Code:[System.Diagnostics.Process]::Start("Program_1").WaitForExit(5000)- Wait for Exit delay is set for 5 seconds (5,000 milliseconds); if the Program_1 is not closed within this time frame, executing the script continues. This will give the Program_1 some time to completely start before Program_2 is launched, increase the value if 5 seconds is not enough
- Start Program_2, this time with Wait for Exit switch with no value:
Code:[System.Diagnostics.Process]::Start("Program_2").WaitForExit()- The Wait for Exit switch without a value causes the script to halt and wait until the Program_2 is closed
- Now kill first task (program) with Taskkill
Should work.
Kari
Last edited by Kari; 06 Aug 2013 at 15:22. Reason: Typo