I have resolved this by adding an inst_loc registry entry:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE.
How to create the entry in registry :
- Open registry
- Go to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
- Create a new key with name Oracle (if it does not exist)
- Go to Oracle and then create a new String Value with name "inst_loc"
- For example : Give the value as "C:\Program Files (x86)\Oracle\Inventory"
Source: https://forums.oracle.com/ords/apexds/post/hkey-local-machine-software-oracle-does-not-contain-entry-f-8712