Most reliable way to check td version outside of TD itself

Hey! I’m interested in ways of how can I get a list of installed td versions via external script. So far I have two ways:

  1. Check folder names in Program Files/Derivative folder, which works for the most parts but I’ve noticed that first time you do a clean installation of td on the system, it names the folder just “TouchDesigner” rather than “TouchDesigner.version.build”
  2. Check some specific td files with toeexpand, but that requires td to be installed on the system and the location to toeexpand also should be known beforehand, which is not possible in my case.

Are there any different methods? Ideally I would like to do a for loop over Derivative directory that reads txt/json/xml file in every subfolder and adds it to the list of versions

Have you seen this project?

Yes, I’m looking at the source code right now. Looks like they are iterating over registry on Windows to get this info, still feels like it can be someting simpler

Another reliable option I have used before is requesting the .exe properties in Python, version number is in the build information.

wow, that sounds really promising, I’ll check this route, thanks!