What if, when you double-click a document, the wrong app tries to open it, or maybe the right app but wrong version? Includes command tool use.
ASN
How to get all sorts of useful information about a running app or process from LaunchServices: and introduction to using lsappinfo.
