- REMOVEOUTOFDATEJRES removes only those JREs which are below the security baseline. Any that are above will not be removed.
- Use a variation of these command lines to remove unwanted JREs:
wmic product where "name like 'Java%%' call uninstall /nointeractive
rem Remove 64-bit flavours of JRE8 wmic product where "name like 'Java%%' AND identifyingNumber like '{26A24AE4-039D-4CA4-87B4-2F864%%'" call uninstall /nointeractive
rem Remove 32-bit flavours of JRE8 wmic product where "name like 'Java%%' AND identifyingNumber like '{26A24AE4-039D-4CA4-87B4-2F832%%'" call uninstall /nointeractive
rem Remove Java 5-7 and Java fx, blah, blah, blah wmic product where "name like 'Java 7%%'"call uninstall /nointeractive wmic product where "name like 'JavaFX%%'"call uninstall /nointeractive wmic product where "name like 'Java(TM) 7%%'"call uninstall /nointeractive wmic product where "name like 'Java(tm) 6%%'"call uninstall /nointeractive wmic product where "name like 'J2SE Runtime Environment%%'"call uninstall /nointeractive
- Your command line doesn't deal with the brain-dead "Your JRE is out-of-date" message which your users will eventually receive (and bombard your Helpdesk with). Google for 'JRE deployment.properties' and act accordingly.
when I do install it manually(with my user) , i don't receive any interactive message, its just uninstall older versions and it install as needs and expected the "8u77" version.
but when I do install it with "SYSTEM" user (PSEXEC -i -s -d CMD) ,or with SCCM deployment (its use SYSTEM user too) its install the new version (as needed) and it "don't" uninstall the older versions as did with my user.
about the WMI removal, there are few reasons becaouse I Prefer do not use it :
1. "wmic product" query takes long time to get results in stations that have alot of software installations.
2. "wmic product" query take too much resources
3. if there is the option build in the JRE package, and it should work, why don't use it ?!
> and it should work, why don't use it ?! One, vendors suck at this stuff and let's not get started on an installer which is an EXE wrapping an MSI which wraps an EXE!
Two, as stated, the installer will - and does! - remove JREs which are BELOW THE SECURITY BASELINE but not those which are on or above it.
I suggest you build a "brute-force" uninstall MSI/script. After all, this junk is just files and registry data so have your uninstaller remove the Javasoft folder, the similarly-named registry key and then the various keys in the registry's "Uninstall" branch. Easy.
Hi, I am really struggling to install Java and was wondering if you could show us your complete script and sub-scripts?
I did some things myself but I can't get it work, ITNINJA is full of approaches but they don't seam to apply to my environment. If I could look at your script, powershell file, deployment.config and deployment.properties that would be really helpful.
This website uses cookies.
By continuing to use this site and/or clicking the "Accept" button you are providing consent
Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our
websites or when you do business with us. For more information about our
Privacy Policy and our data protection
efforts, please visit
GDPR-HQ