The current uninstall algorithm for the jre/jdk recreates the CurrentVersion string in the registry based on the remaining jre/jdk's that are registered. The problem occurs when there are no remaining jre/jdk's on the system, and the uninstall algorithm recreates the CurrentVersion string with an empty value "". It shouldn't recreate this string if there are no jre/jdk's on the system.