How to determine user's software version by TCL

Across our team some people use Hypermesh/Hyperworks Desktop and some use plain HyperMesh, one of our .TCL scripts need to vary depending on which software is being used. I can't seem to find any queries that return a useful difference I could compare against.

HW or HWDesktop has a bigger list of APIs supported such as the 'hwi' class.
So if you run 'hwi ListMethods' in HWDesktop, you will get this as return.
Not the fancier way, but you could use this to identify if it is HMDesktop or Standalone HM.
HWDesktop
HM doesn't have this.
Thanks, this is what I ended up doing. I had to use Catch to catch the error that comes up if you try to run a desktop command in hypermesh and I could then create my if statement based on that catch. I'm not a huge fan of causing errors on purpose in these tools, but it works.
HW or HWDesktop has a bigger list of APIs supported such as the 'hwi' class.
So if you run 'hwi ListMethods' in HWDesktop, you will get this as return.
Not the fancier way, but you could use this to identify if it is HMDesktop or Standalone HM.
HWDesktop
HM doesn't have this.