ash10
10 years agoOccasional Contributor
How to check if application is closed
I want to check if exe application is closed before opening another instance of application.
Right now I am using script like.
WMI["ComputerName"] = ".";
WMI["WaitForProcessExit"]("MyApplication.exe", 30000)
MyApp= TestedApps["MyApplication"]
MyApp["Launch"] = true
MyApp["Run"](1,true,-1);
After I click on close applicaton I call this script and then open another instance of application.
But some times it take more time to close the
existing application and so the above script does not work.