This is a read-only archive. No new posts or registrations. Privacy Page
Discussion

Java Setup Problem

64 min read

This thread's last reply is from . Advice, software, and links below may be out of date — treat specific steps and download links with caution.

If you have been having problems with Java, and you have followed some of the instructions on the forums you may find that you no longer can get Java to install because of an error.

When you attempt to run the java installer file you receive the message:

This software has already been installed on your computer. Would you like to reinstall it?

When you click Yes to the above question you receive the error:

This action is only valid for products that are currently installed.

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 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:📎fixjava.zip

    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.
Hey appleoddity! Have probs you described with JRE 6 update 15. http://www.java.com/en/download/inc/windows_new_xpi.jsp

Running Firefox but am sure others who run IE would be interested as well.

Sure appreciate your offer "If you need a fix for a newer version of Java when it comes out, reply to this thread and I will create the new fix for that version. ".

Happy to not have to try deleting all "java" keys (got a bunch!).

Again, Appreciated guy! Thanks, Diligent
Hi Diligent… A big welcome to WhatTheTech. I will update this thread soon. I currently do not have a Vista machine in front of me. When I release the fix I want it to work for both Vista and XP, so I need to get to a Vista machine tomorrow. Be patient and thanks for your interest.
@ appleoddity Saw in a thread you posted that you were busy, That's understandable. So I had to make a decision not knowing when you would be back or be able to make a new fix. So I tried the u14 anyway. Saw a (?) "mis" change. Also did an Erunt registry reset. Java Now working. Folks at Comodo are awaiting your new fix, as I have advised them of your first post. So when ya get the new fix done, when ya have time, I'll let them know if that is alright with you. You can check in with them too, ya know. BTW, I do find this forum quite interesting. Bookmarked!! Take your time my friend. You have a personal life too! My Best to ya, Diligent (Jim), in the Evergreen State of Washington (west coast).
Urgent help is required! I have the same problem! After installing Java 6 update 16, I accidentally used Windows Install Clean Up and deleted this update. I also deleted the folder in Programs Files and now I can't reinstall the update and keep getting the error message. Please provide fix or provide guide as to which registry entry to delete or change as soon as you can. I'm using Windows Vista Ultimate. Thank you.

To make things easy, I have provided a .reg fix that you can use to remove the necessary entries and get the Java 6 Update 14 to install. It will also work for other versions of Java if your problem started after you ran the Windows Installer Cleanup Utility


Because your problem occured as a result of using the Windows Installer Cleanup Utility, you should be able to run the registry fix I provided in my initial post and have the problem resolved.

The fix will remove this registry key: HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
This is left behind after the windows installer cleanup.

The problem occurs because the Java setup program you download looks for "evidence" of a current installation of Java on your computer (the above registry key). If it finds it, it will attempt to run the currently installed "installer file" rather than reinstalling with the fresh installer you downloaded. If the installer cleanup was used, those installer files are deleted, so the problem occurs. It makes no sense to me why Java would do this, and hopefully someone from the development team will see this and fix the problem once and for all.
I made an account on this site just to say thank you. You were a great help and solved the problem fast. I have been researching how to fix this for about a week and I could find no answer. I finally resorted to Java.com's live chat support and the person said it would cost 35$ to fix.. and I was like. no. There are so many people out there with this problem I discovered and there are really no answers for it. Java really needs to fix the problem. Thank you so much man you are a great help!
I did the same thing as jeff562, so I could express my thanks to appleoddity for the help. It's a real pleasure to find a thread that deals with issues competently and courteously. It took some searching to find this resource after weeding out threads on other sites, packed with useless puffery and snide commentary. A breath of fresh air, you are. Grateful, I am.
As with the previous two new signees, I have just registered here so that I can express my gratitude for the registry fix posted above. Having spent several hours today tearing my hair out and running through ineffective solutions suggested on other forums I finally hit upon this thread and used your fix. As a result my problems are resolved and I'm smiling again. Thank you so much - you are a legend!!!
awwww. :( still can't get my java to work, well i don't even understand everything what u said, because english isnt my first languange so.. but yeah anyway; CODE Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\4EA42A62D9304AC4784BF238120641FF] [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\4EA42A62D9304AC4784BF238120621FF] [-HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment] What is this supposed to mean ? how can i get to that point? please, help me out oh yeah, does that same thing work with windows 7?
The CODE is simply the contents of the attached file that I provided for your own inspection. It tells registry editor to remove those three keys. Can you please tell me if you have run the windows installer cleanup utility to try and fix this problem at all? (I'm not suggesting it, I just need to know where you stand) Also, can you tell me if you are running 32-bit or 64-bit Windows, and which version (32-bit or 64-bit) of Java are you trying to install? Did you try downloading the attached file in post #1, and importing the changes into your registry? I don't think this fix will work on a 64-bit bit operating system for the 64-bit version of Java. I can investigate that if need be and provide a fix.