title: Programmatically retrieve version of an installed application
body: <p>I want to programmatically retrieve the version of an installed application (which is currently running), of which I have the name of the running process. If possible, retrieving the install directory would also be appreciated, but that is optional.</p>
  
  <p>I've searched at a lot of places, and some questions looked similar, but they do not give me what I ask for.</p>
  
  <p>To be a bit more specific, right now I want to do this for Visual Studio i.e. I have a WPF app, which is running alongside Visual Studio &amp; given that I know the process name for Visual Studio i.e. "devenv", how can I get the version information of Visual Studio installed on my machine, from the WPF app? This is just an example, don't assume anything particular to Visual Studio. In the general case, we'd have an app running, for which we know the Process name &amp; want its installed version.</p>
  
  <p>Can you please provide the C# code for doing this?</p>