Search code examples
c#pythonwindows-8windows-store-appsironpython

IronPython-List Open Metro Apps only


Background

I am working on a program that needs to find a list of open Metro apps. I originally tried using pure python with ctypes and using win32 api. Unfortunately, I couldn't get the names of Metro apps. So I moved on to IronPython thinking I could leverage a .net function or two to get what I want. No luck.

Where I am at

I can easily get a list of running processes and their PID, but filtering the Metro apps from the non-metro apps is proving near impossible. Also, I need to get the HWND of that window so I can interact with it.

What Won't Work

EnumWindows doesn't seem to work. FindWindowEx seems promising, but I am not sure how to do this.

Thanks in advance.

EDIT: I am now able to get what I want using IsImmersiveProcess, but the process list is doesn't include the Windows Apps.


Solution

  • I don't think MS allows this functionality. As an alternative, you can have the user put their mouse over the window and press a keyboard shortcut (What I am doing).

    That is the best one can do.