Oracle states that the Java SE installer is built using MSI, but the help page, rather unhelpfully doesn't list uninstall options.

I need to do a command line uninstall, and I can't figure out or find relevant the options for 1.6.21

I've tried wrapping the installer .exe in msiexec using msiexec /q /x <jre>.exe, but this just reports that the installation package could not be opened.

Running the installer .exe with the /s /x option just hangs.

Edited to add: msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160021} /q => "This action is only valid for products that are urrently installed"

Anyone got the right command line?

link|improve this question
1  
Can't you uninstall it from Control Panel -> Add/Remove Programs – Nishan Mar 15 '11 at 9:19
1  
It's for a compute cluster so ideally it needs to be command line uninstall. – nick3216 Mar 15 '11 at 9:24
feedback

migrated from stackoverflow.com Mar 15 '11 at 9:51

This question came from our site for professional and enthusiast programmers.

2 Answers

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.

link|improve this answer
Installing JDK 1.6u21 onto a local PC allowed me to see that the GUID isn't the one I was expecting (based on Oracle docs & Server Fault). A JRE/JDK difference. reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{32A3A4F4-B792-11D6-A78‌​A-00B0D0160210} /v uninstallString – nick3216 Mar 16 '11 at 9:45
hmm, on the compute nodes MSIEXEC reports that action is only valid for products that are installed and reg query /s HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall has no record of the JDK being installed. – nick3216 Mar 16 '11 at 10:07
feedback

Uninstallation in Silent Mode

link|improve this answer
@christopher-painter - sorry I can't assess your answer as it's not available behind corporate firewall. – nick3216 Mar 16 '11 at 9:49
its funny because that pointed to here! – Ape-inago May 1 at 15:57
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.