I currently run the Java JRE on my 2000+ workstations. Unfortunately, I don't have a good enterprise deployment method for Java. Historically, I have relied on the version that would have been installed upon image deployment to last the OS through its lifetime in the enterprise. Once the machine needs to be reimaged, a new version of Java will be installed as part of the imaging process. This has worked well, until now. I have now been informed that the version of my JRE on the majority of my machines is too old to support a business application that is widely used. I'm now faced with the question of how to update many older versions of Java to something more recent.
I'm thinking that a Powershell script might be the way to go, as this is my language of choice. Would it be possible to pull a value from the registry into a variable that would then allow me to uninstall an old version? I have many different updates of Java 7 installed in my enterprise, so not all machines will have the same versioning. I then need to script an unattended install of Java 7.65 (or newest version) to upgrade the machines. In my experience, the Java installer does not replace old versions, it only installs two versions side-by-side.
What would be the best way to conquer this task?