Dynamic Version from License File Script

I am trying to write a script that can be uses in a cross tenant deployment and will use the release version information from the config.ini file that we have uploaded via a license file to select the version to use when deploying. We have multiple companies on different versions of the same software each has its own config.ini for the install to use and we have been using the license file to hold these. If I create an individual deployment for one client and set it to their version and license file it works great so does a cross tenant deployment if it needs to be the same version, I cant seem to figure out the variables to unpack the license file and read it to select the version. Pretty lost here and not the strongest scriptwriter.