We are running IE9 and Java 1.7 Update 51 (WIN7) in our environment and I am having a heck of a time getting rid of the following popup.
Since update 55 was released, users get the following prompt when brought to a Java page. Of course, if they hit Later, the Java app will run and the world is safe. But people hit different things and it's my job to herd the cows in the right direction.
What I found is that by adding the following Reg Key to HKCU
HKCU\Software\AppDataLow\Software\JavaSoft\DeploymentProperties /v deployment.expiration.check.enabled /t REG_SZ /d false /f
it will suppress the prompt. So I was planning on iterating through all user profiles and adding the key. But, after a reboot, my key is deleted and on the next launch of a Java app, I will get a prompt.
I'm prepping Update 55 for my environment and would like to get rid of this prompt for future releases of Java.
I also tried to use a deployment.properties file with the following data inside it:
deployment.expiration.check.enabled=false deployment.expiration.decision.suppression.10.51.2=true deployment.expiration.decision.10.51.2=later
I placed that file in the user directory C:\Users\%username%\AppData\LocalLow\Sun\Java\Deployment after an installation of Java.
That didn't work either.
2 Answers
I have been wrestling with that annoyance also and I discovered that the HKCU\Software\AppDataLow\Software\JavaSoft\DeploymentProperties registry key gets its values from the user's deployment.properties file.
I have been deleting the file, recreating it then writing the properties/values that I want before Java loads. I have been running from the all users start up successfully on a Windows 7 32-bit and 64-bit test computer for the past two days.
Here is a PowerShell function that has worked for me:
Function JavaProperties
{ $userProfile = $Env:USERPROFILE Remove-Item -Path "$($userProfile)\AppData\LocalLow\Sun\Java\Deployment\deployment.properties" -Force New-Item -Path "$($userProfile)\AppData\LocalLow\Sun\Java\Deployment" -ItemType File -Name "deployment.properties" $deployFroperties = Get-ChildItem -Path "$($userProfile)\AppData\LocalLow\Sun\Java\Deployment" -Force -ErrorAction SilentlyContinue | Where{$_.Name -eq "deployment.properties"} | Select -ExpandProperty FullName $expDecision = New-TimeSpan -Start $($(Get-Date).ToString()) -End "January 1, 2020 11:59:00 PM" | Select -ExpandProperty TotalMilliseconds $expDecision Add-Content -Path $deployFroperties -Value "deployment.expiration.decision.suppression.10.51.2=true" -Force Add-Content -Path $deployFroperties -Value "deployment.expiration.decision.10.51.2=later" -Force Add-Content -Path $deployFroperties -Value "deployment.expiration.decision.timestamp.10.51.2=$expDecision" -Force Add-Content -Path $deployFroperties -Force -Value "deployment.system.tray.icon=true"
}#End Function JavaProperties Well in addition some stuff I got out discovering Java web start Decompiling c:\Program Files (x86)\Java\jdk1.8.0_66**jre\bin\plugin2\npjp2.dll** in IDA6 Hexrays
These settings are involed:
HKEY_CURRENT_USER, SOFTWARE\AppDataLow\SOFTWARE\JavaSoft\DeploymentProperties\pending deployment.expiration.decision.11.66.2 = update|block|later deployment.expiration.decision.suppression.11.66.2 true deployment.expiration.decision.timestamp.11.66.2 86401..18446744073709551616 (<- 0xFFFFFF FFFFFF)
HKEY_CURRENT_USER, SOFTWARE\AppDataLow\SOFTWARE\JavaSoft\DeploymentProperties deployment.expiration.decision.11.66.2 deployment.expiration.decision.suppression.11.66.2 deployment.expiration.decision.timestamp.11.66.2 deployment.webjava.enabled false deployment.expiration.decision.ttl.11.66.2 86401..18446744073709551616 (<- 0xFFFFFF FFFFFF)for below windows vista leave out the "SOFTWARE\AppDataLow\" part
so feel free to play around with this and you may also try these values as enviroment settings like this
Startbrowser.cmd
set deployment.expiration.decision.11.66.2=later
set deployment.expiration.decision.suppression.11.66.2=true
Firefox.exe %*Okay that it.
At the end some pseudo code. Take it as hint. And don't be to serious -in case it's confusing just ignore it.
BOOL __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) StringCompare ~otherStrings~ VIA mbscmp ~timestamp~ VIA sscanf "%llu" (<-unsigned long long int)
GetFromEnvOrReg_Depl_pending FORALL deployment.expiration.decision.11.66.2 deployment.expiration.decision.suppression.11.66.2 deployment.expiration.decision.timestamp.11.66.2 deployment.expiration.decision.11.66.2 == update 1 block 2 later 3 if NoValidValue GetFromEnvOrReg_Depl FORALL deployment.expiration.decision.11.66.2 deployment.expiration.decision.suppression.11.66.2 deployment.expiration.decision.timestamp.11.66.2 deployment.expiration.decision.suppression.11.66.2 true deployment.expiration.decision.timestamp.11.66.2 GetFromEnvOrReg_Depl deployment.webjava.enabled false if success return false ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ unfinished deployment.expiration.decision.ttl.11.66.2 ttl+604800 (or +10 if decision is 'later' ) compare is bigger as timestamp if ... decision is not 'block' return false ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FUNC GetFromEnvOrReg_Depl_pending ( $Value ) MSVCR100.getenv if success return $result RegOpenKeyExA HKEY_CURRENT_USER isVistaOrAbove SOFTWARE\AppDataLow\SOFTWARE\JavaSoft\DeploymentProperties\pending SOFTWARE\JavaSoft\DeploymentProperties\pending RegQueryValueExA $Value if success Return $result FUNC GetFromEnvOrReg_Depl ( $Value ) *same* but with SOFTWARE\JavaSoft\DeploymentProperties FUNC isVistaOrAbove GetVersionExA VersionInformation.dwPlatformId == VER_PLATFORM_WIN32_NT (2) && VersionInformation.dwMajorVersion >= 6