@jmalik refer this post,it might be helpful for your issue. Instead of jre try referring to jdk path.
Windows Installation fails