title: get the bundle identifier of an application running from another user
body: <p>The scenario is like this: "I run an app (say <strong>myproc</strong>) from one user and then fast user switch to second user"<br>
  Now, when I try to determine all processes running with a particular bundle Identifier (say <strong>com.ak.myproc</strong>); I am not able to determine this for processes running from first user.</p>
  
  <p>I've tried the following but in vain:</p>
  
  <ol>
  <li><code>[NSRunningApplication runningApplicationsWithBundleIdentifier:]</code></li>
  <li><code>[[NSWorkspace sharedWorkspace] runningApplications]</code> and then comparing bundle identifier of each application - the app running for first user does not even show up in this list.</li>
  <li>using <code>sysctl()</code> and then iterating through the process list - Here, the pid of the app from first user does come. After that:
  <ul>
  <li>When I try <code>[NSRunningApplication runningApplicationWithProcessIdentifier:]</code>, I get nil.</li>
  <li>When I try <code>GetProcessForPID()</code> followed by <code>ProcessInformationCopyDictionary()</code>, I get a nil dictionary.</li>
  <li>When I try <code>GetProcessForPID()</code> followed by <code>GetProcessInformation()</code>, I do not get anything useful in <code>ProcessInfoRec</code>.</li>
  </ul></li>
  </ol>
  
  <p>Can somebody please help? Thanks.</p>
  
  <p><em>OS: Mac OS X 10.8.4<br>
  Xcode: 4.6.2</em></p>