Search code examples
javascriptwindowsuriuwpwinjs

How to monitor process spawned using launchUriAsync from WinJs


As per the title I am running an app through a URI call and I would like to know when the app has finished running and been terminated. The app is a 3rd party app and it doesn't have a return value that I could use.


Solution

  • I would like to know when the app has finished running and been terminated.

    This is not a recommended implementation for a standard UWP app and this is impossible for UWP.

    A standard app in a security context should not control or monitor the lifecycle of other apps. User and system should take the responsibility.

    We can find some clues from the correlation between the lifecycle changes for these two UWP app, but there is no perfect way to fit this scenario. Not only UWP, but also other popular Platform, this is the same, see here