title: Get process id of a running metro app
body: <p>I want to get the process id of a running Metro app programatically via C++ code, from another process. I have the static information of that app like name, full name etc. What is the API to do that?
  I can't use EnumProcess since the running Metro App is being run inside app container WWAHost.exe, so I can't know which of the running WWAHost.exe processes is actually running <em>my</em> Metro App.</p>
  
  <p>In process explorer, I noticed that the Current directory of the WWAHost.exe process which is executing my Metro App is same as metro app install location. Could this be the differentiating factor between all the running app containers? If yes, what is the way to get current directory of another process?</p>
  
  <p>To update, I have got some a solution regarding this on msdn forums. Here's the link:</p>
  
  <p><a href="http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/c9665bf4-00e4-476c-badb-37126efd3f4b/" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/c9665bf4-00e4-476c-badb-37126efd3f4b/</a></p>
  
  <p>But, the solution uses an undocumented mechanism on Windows to get current directory of another process. I would like to use that solution only if there's no other way.</p>