(imported comment written by sinucus)
We’ve had similar problems with Java and my only solution was to unpackage the JDK and extract out the .msi file located inside it. Below is a copy of our Java 7u25 x64 install.
Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html and select their JDK download. Once downloaded, run the .exe file and DON’T CLICK ANYTHING… Once the installer is opened, navigate to C:\Users%username%\AppData\LocalLow\Sun\Java\jdk1.7.0_25_x64 and find one of the .cab files that has the .msi in it, extract that and you are good to go.
prefetch jre.msi sha1:0d832d170a33b1ff3f991bfdb76d0899348fa528 size:31369728 http://EXAMPLEURL/jre.msi
// Note: update .exe will restart service automatically
if{exists running service “JavaQuickStarterService”}
delete __appendfile
delete stop_javaquickstarter.bat
appendfile net stop JavaQuickStarterService
move __appendfile stop_javaquickstarter.bat
waithidden stop_javaquickstarter.bat
endif
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\JavaInstallation]” “InstallingJava7_64”=dword:00000001
waithidden msiexec.exe /qn /i __Download\jre.msi
action may require restart “0d832d170a33b1ff3f991bfdb76d0899348fa528”
continue if {((exists value “DisplayVersion” whose ((it = “7” and it >= “7.0.250”) of (it as string as version)) of keys whose ((value “DisplayName” of it as string as lowercase contains “j2se runtime environment” OR value “DisplayName” of it as string as lowercase starts with “java 7”) AND (value “DisplayName” of it as string as lowercase contains “64-bit”)) of it) AND (exists key whose (((it contains “java” OR it contains “j2se”) AND ((it contains “runtime environment” OR it contains “update”)) AND (it contains “64-bit”)) of (value “DisplayName” of it as string as lowercase)) of it)) of key “HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall” of x64 registry}
regdelete “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\JavaInstallation]” “InstallingJava7_64”