How to find Oracle's installed version and release from a program?
If the database homes were installed properly, the central inventory has a list about them.
The central inventory on Windows is located at C:\Program Files\Oracle\Inventory. On Linux/UNIX platforms, the location of the central inventory can be found in /etc/oraInst.loc. In the inventory, in ContentsXML\inventory.xml, there is a list of installed homes in XML format, e.g:

&lt;INVENTORY&gt;
&lt;VERSION_INFO&gt;
   &lt;SAVED_WITH&gt;12.1.0.2.0&lt;/SAVED_WITH&gt;
   &lt;MINIMUM_VER&gt;2.1.0.6.0&lt;/MINIMUM_VER&gt;
&lt;/VERSION_INFO&gt;
&lt;HOME_LIST&gt;
&lt;HOME NAME="OraGI12Home1" LOC="/opt/oracle/grid12102" TYPE="O" IDX="1"/&gt;
&lt;HOME NAME="OraDB12Home1" LOC="/opt/oracle/base/product/db12102ee" TYPE="O" IDX="2"/&gt;
&lt;HOME NAME="OraDb11g_home1" LOC="/opt/oracle/base/product/db11204ee" TYPE="O" IDX="3"/&gt;
&lt;/HOME_LIST&gt;
&lt;/INVENTORY&gt;


You can parse this list, and find detailed information with opatch for example:

/opt/oracle/grid12102/OPatch/opatch lsinventory -oh /opt/oracle/grid12102 -details
/opt/oracle/base/product/db12102ee/OPatch/opatch lsinventory -oh /opt/oracle/base/product/db12102ee -details
/opt/oracle/base/product/db11204ee/OPatch/opatch lsinventory -oh /opt/oracle/base/product/db11204ee -details


A Windows example would be:

C:\oracle\base\product\12.1.0\dbhome_1\OPatch\opatch lsinventory -oh C:\oracle\base\product\12.1.0\dbhome_1 -details


The above needs to be run on the server of course.

This is the best-case scenario, with proper installations. Worst-case scenario is, homes use separate inventories, or use no inventory at all, and you have to search all filesystems on the server for possible Oracle installations.