You can find the correct product code to pass to msiexec /x by opening in the registry (regedit). Open the key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Select the Uninstall key and "Find" from the "Edit" menu. Search for "Java." This should show which subkey the Java is located under. One of the keys is "UninstallString." Use this command to uninstall Java. Note however, this will only work on other machines if the exact same version of Java is installed.
Answer from heavyd on Stack ExchangeRemove Java from ALL systems.
Unable to uninstall old version of Java
Java uninstall tool
Java Uninstall
Videos
Hello i have been recently tasked with a plan and execute the removal of java from all systems in our environment. The previous person was attempting to complete this through a series of task Sequences in SCCM but was not very successful. Are there any scripts to complete this task and should it be completed by task sequence?
You can find the correct product code to pass to msiexec /x by opening in the registry (regedit). Open the key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Select the Uninstall key and "Find" from the "Edit" menu. Search for "Java." This should show which subkey the Java is located under. One of the keys is "UninstallString." Use this command to uninstall Java. Note however, this will only work on other machines if the exact same version of Java is installed.
There are 2 places where you might find the product code:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\4EA42A62D9304AC4784BF238120662FF\InstallProperties
or
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
You should be able to find the uninstall string from the key UninstallString; something like: MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216026FF}
Hello all are there any switches for java uninstall tool, We want to uninstall Java JRE and then SDK.
Regards
You should be able to use regular Windows Command Line Tool to uninstall the software as Windows sees it as a MSI style install software. If you want to get rid of All Java named programs you can always do the following in a batch file:
wmic product where "name like 'Java%%'" call uninstall
I’ve used it in multiple places I’ve worked and it’s been great. That being said, if you want to uninstall other software that doesn’t seem to work with wmic, you can look in the Windows Registry and most of the installed program will state what you need to do to uninstall and in some cases even give you the command to silently uninstall.
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\
and
HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
Trying to do cleanup, a lot of machine have various old versions of java installed, does anyone have a saving grace, uninstall all old java versions script?
Did you run “sudo uninstall file://” first? The “rm -fr” command is forcing recursive removal of folder items. It will not look in other locations to remove the application or unused dependencies.
Have you considered using a package manager like Homebrew?
There is also an uninstaller project you could try.
We had a MAC computer that we wanted to uninstall JAVA from. We ran the following commands:
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Oracle/Java
and
rm -r ~/“Library/Application Support/Oracle/Java”
The first 3 commands were taken from this article:
(https://www.java.com/en/uninstall/uninstall_instructions.html#macOS)
And the 4th command was taken from this article:
(https://www.java.com/en/download/help/deployment_cache.html)
However, our RMM claims this computer still has JAVA. So, do you think these commands would have indeed uninstalled JAVA? Is our RMM likely incorrect?
Thank you.
Apparently, Oracle is trying to bill us for any version installed by end users
I am not trying to reinvent the wheel, so I am hoping someone else here has dealt with this and can help me to create an intune app or remediation to remove all versions of Java from a group of devices.
I have tried using the software deploy-application.exe with a detection rule looking for the variable called path under HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\javaws.exe but this continues to show me that Java is uninstalled on devices I can clearly see the registry path there.
Thank you for any help you can give.