Automating uninstall of multiple Java versions
Recently at work, I had to come up with a way to uninstall any installed versions of Java on our AD managed systems, then install versions 1.5.11 and 18.104.22.168 (the latest versions of 1.5 and 1.4, essentially). Luckily, Alan found a site that directly addresses this issue, and I was able to quickly grab all the upgrade codes for the previous Java MSIs. Armed with this info, I quickly inserted all the upgrade codes into the 1.5.11 JRE MSI, which I had extracted from the setup .exe bootstraper (it’s in %username%\Local Settings\Application Data\Sun\Java\jre1.5.0_11). I tested it with 1.5.10 on my system, and it upgraded it like a charm.
Since the upgrade code for each sub-version is different (why, Sun, why?), you have to paste about 20 codes in one by one, which is a major pain. As a service, I’ve created an MSI that is only the upgrade codes. Just paste the upgrade table of this MSI into the Sun Java one (I’m not providing a hacked MSI on this site, that would just be stupid), and you’re good to go, and you can avoid the 20 stupid table entries. Here’s the file: