AutoCAD uses the Windows system registry to maintain a wide range of application information, including information that uniquely identifies different AutoCAD releases, language versions, and products (such as AutoCAD Map ) that may be installed on any given computer. The registry information that identifies different versions of AutoCAD is of particular significance for ObjectARX developers. The installation program for an ObjectARX application must associate information about that ObjectARX application with information about the version(s) of AutoCAD with which it is supposed to run.
The AutoCAD installation program creates a unique time stamp key in the system registry immediately below the release number key (as well as adding the same installation ID to the executable itself). This key ensures that different versions of AutoCAD from the same release will be able to populate their own sections of the system registry. Within this key, values are stored for attributes such as the location of AutoCAD files and the language version, as illustrated in this example:
\\HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R24.0\ ACAD-4101:409\ ... Language:REG_SZ:English Location:REG_SZ:C:\Program Files\Autodesk\AutoCAD <release_name> ...
The installation program for an ObjectARX application must be able to locate the appropriate AutoCAD release key, as well as the appropriate language and product values.
The time stamp key is also used to identify the version of AutoCAD that is currently loaded (or the version that was most recently loaded). This identification is necessary, because the "current" version of AutoCAD resets the information in the global HKEY_CLASSES_ROOT section of the registry for its own use when it is loaded.
The CurVer value in the release key section of the registry is used to identify the current version, for example:
\\HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R24.0\ CurVer:REG_SZ:ACAD-4101:409