How to track WinRT applications (in Win32 it was simple)? How to track WinRT applications (in Win32 it was simple)? windows windows

How to track WinRT applications (in Win32 it was simple)?


You see, in WinRT, your application is the top-most application. And when your app is not the top-most application then your threads are suspended and the kernel will not schedule any more operations for your app. End of story.

This means what you are wanting to accomplish cannot be done in WinRT. You are thinking more like a resident app or a service with access to the desktop. Those apps have two advantages. 1) they are always running. And, 2) they have the API to do what you are wanting.

WinRT intentionally puts apps in a sandbox so that the user's experience, performance and battery life are protected. Your scenario and scores more like yours underscore the continuing need for desktop apps. (as long as there is a continuing need for those types of apps ;)).

Sorry, if this is bad news.

As for enumerating other apps. This is also not possible. You cannot know if another app is installed or if it is running. You can call out to another app through protocol activation or file activation or (in a sense) through the share contract. But you are unaware if they get the message and if the user has it installed in the first place. And this is by design.

It is worth mentioning that you can pinvoke to Win32 APIs in your WinRT application. It causes lots of problems and can create a headache to get certified into the store. But even then, not all APIs are open to you. And you will find this particular use case is a non-starter.


I am sure this will not be possible. With Windows 8 'Metro' only a single application is active. All other applications will be in a suspended state whilst the topmost application is running. This makes it impossible to write an application that monitors other applications which are currently executing.

See the numerous articles on the Windows 8 app lifecycle.