Standard configuration file(.cfg) look at Registry

I am looking to see if there is a way that in the config file that I can look at the registry and see what the latest version of AutoCAD is installed and then I can set other variables.  Is there a way to do this in a configuration file?