While Installing Oracle 12.2.0.1.0 the setup fails after setting directory.During Installation instead of pointing to a new directory it is pointing to the location of an old oracle 11g home, Normally while changing Oracle home,Software location would automatically change to include the Oracle Home but in this case it didn't change automatically.An error was received attaching the error below.
Create a response file where you can put an entry like this:
INVENTORY_LOCATION=C:\whatever directory you like to have\Inventory
Also check your Registry settings at
HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\inst_loc
I don't know which one takes precedence, you may change both.