When you attempt to run the java installer file you receive the message:
When you click Yes to the above question you receive the error:
This software has already been installed on your computer. Would you like to reinstall it?
This problem is caused because the Windows Installer information for a previous installation of Java has been removed or damaged, but the related registry keys are still present causing the Java installer to think it is already installed.
This action is only valid for products that are currently installed.
This problem can be caused if you used the "Windows Installer Cleanup Utility" to remove the Java entries without first uninstalling Java properly.
To fix this problem you must remove the two places in the registry that the Java installer looks at in order to determine if it is already installed. By removing these entries, the Java installer will begin a new installation instead of attempting to repair the old corrupt installation.
Updated Jan. 22, 2011 -- Created an automatic fix in executable form.
Please download and run this automated tool to fix the Java MSI problem on all versions of windows: JavaMSIFix
NOTE: The batch file method listed below no longer works on Windows XP in many circumstances due to a limitation in command line parameters supported by Windows XP.
Updated Feb. 26th, 2010 -- Created a universal fix for all versions of Java 6
*** Please use the automated executable listed above instead of this batch file. ***
This problem is confirmed in Windows XP, Windows Vista, and Windows 7.
Because the registry keys that need to be removed are different for each version of Java, I have created a batch file you can download to find and remove the entries automatically.
Here's how to fix Java:
- If you are able, uninstall all previous versions of Java in add/remove programs in your control panel.
- Next, you may download the current version of Java here: http://java.com/en/download/manual.jsp
I recommend that you use the offline installer version.
- Now, download the fix:
Open the fixjava.zip file, extract and run the file fixjava.bat . If you are using Windows Vista, or Windows 7 you must right-click the fixjava.bat file and choose "Run As Administrator". If you do not see the run as administrator option, drag the fixjava.bat file to your desktop and then try to run as administrator from there.
The batch file will run briefly without confirmation.
- You may now install Java without any errors about it already being installed.
The contents of the batch file are listed below:
reg query hklm\software\classes\installer\products /f "java(tm) 6" /s | find "HKEY_LOCAL_MACHINE" > deljava.txt for /f "tokens=* delims= " %%a in (deljava.txt) do reg delete %%a /f del deljava.txt reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment" /f reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\wow6432node\JavaSoft\Java Runtime Environment" /f
This fix will work on Windows XP under certain cirumstances, Windows Vista, and Windows 7 for both 32-bit and 64-bit versions of the Java 6 runtime environment.
If you have any further issues please post a reply in this thread.
Edited by appleoddity, 02 February 2011 - 10:07 PM.