Background
Google Chrome prevents Java from automatically running when it detects that the version you currently have installed is not the most recent. I finally got tired of the nagging and decided to upgrade to 7u4 (from 6u29). I downloaded the offline version and proceeded to install it, but it kept failing with some sort of error and directing me to a help page on the Java website. I head on over to Programs and Features and attempted to uninstall all old versions, but the x86 version refused to uninstall (both x86 and x64 Java are installed). I then attempted to manually remove Java using DK Finder and regscanner (by NirSoft). I deleted every trace of Java I could possibly find. I even installed Java in a virtual machine and monitored the installation with Regshot 2.0 unicode to make sure I had all the correct registry keys deleted, but even that did not help.
Process
- Visit http://support.microsoft.com/kb/223300 and download/run the fixit tool that enables Windows Installer Logging
- Attempt to install Java again
- After it fails, put %temp% in the run box to bring you to the Temporary Files folder
- Switch to details view and sort by Date Modified/Descending (this will put the most recent files at the top)
- There should be a jusched.log and a MSI(random text).log
- Open the MSI log file and search for “return value 3”
- Find the last “return value 3” entry
In my case the line reads
Action ended 22:38:28: SetupCompleteError. Return value 2.
Action ended 22:38:28: INSTALL. Return value 3. - This basically just indicates that setup encountered an error and the install won’t finish
- The error before it reads:
Action ended 22:38:20: RemoveExistingProducts. Return value 3.
Action ended 22:38:20: INSTALL. Return value 3. - This is the helpful one. We can see that the installer is stopping when it’s trying to execute the RemoveExisitingProducts sequence
- To fix this, I downloaded SuperOrca and opened the MSI installer file located at %APPDATA%\\..\\LocalLow\\Java\\jre(version)\\jre(version).msi
- The above file should be extracted and left by the installer downloaded from the Java site after it’s been used at least once
- With the file open, I selected InstallExecuteSequence in the left pane and located RemoveExistingProducts
- I deleted the entry using the Drop Row command from the right-click menu
- I then saved it with a new name and executed it
Resources
- SuperOrca
- Windows Fixit #50380
- List of folders added when Java 6u29 is installed can be found here
- Registry key remove file for Java 6u29 can be found here (USE WITH CAUTION)
Conclusion
I’m still not exactly sure how the problem got started in the first place, but it seems Java attempted to add a feature to remove previous versions that ended up breaking the installation for some reason. If you’re having problems with Java installation first try Programs and Features (Add/Remove Programs). Next, give JavaRa a try. If all else fails, you can give the above method a shot and hopefully get Java up and running without a reformat.
Thank you, fixed it for me.
Running Microsoft FixIT multiple times completely fixed it: http://support.microsoft.com/mats/Program_Install_and_Uninstall
Thanks for this! Finally got Java 7u13 to install using this tip. Don’t know what caused it to begin with but I got exactly the same error as you when trying to upgrade machines from 7u9 and 7u11 to 7u13.