If deployment registration failed, we can try to disable java, run deployment registration one more time, and enable java again. I mean the following:
installer -> deploy.dll -> RegisterDeployEx()-.. returns FALSE -> diable java -> run RegisterDeployEx() ->enable java, now return result to installer...
This is like a workaround for the following problem - https://www.java.com/en/download/help/error_1603.xml, according to user comments it works, so it can help in some cases. We can also consider to perform a separated registry cleanup instead of enabling\disabling java.