ConfigMgr: Oracle JRE 7u71 bereitstellen

Obwohl bereits JRE8 bereitsteht, wird die 7er Version trotzdem noch verteilt. Das Setup hat trotz anderslautender Parameter die Autoupdate Dienste mitinstalliert, die in einem Unternehmensumfeld nicht sinnvoll sind.
Daher entfernt diese appdefinition.xml Datei diese nach der Installation. Das notwendige MSI File erhält man, in dem man die Exe ausführt und dann (ohne das Setup zu beenden) die msi und cab Datei aus dem %userprofile%\AppData\LocalLow\Sun\Java\jre1.7.0_71 kopiert.


Der Download ist unter http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html zu finden.

<appdefinition>
<file>jre1.7.0_71.msi</file>
<hash type="SHA256">3FCEC988D7B1B2BECC120317D407DB34D751B0F04C40F5B09EABDF2D0871DF65</hash>
<info>
	<company>Oracle Corporation</company>
	<setupType>MSI</setupType>
	<isX86>true</isX86>
	<hasUninstall>true</hasUninstall>
</info>
<install>
Execute-MSI -Action Install -Path "jre1.7.0_71.msi" -Parameters "REBOOT=ReallySuppress JAVAUPDATE=0 CUSTOM=1 /QB"
if ($is64Bit) {$regPath="HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"} else { $regPath="HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"}
$javaPath=(Get-ItemProperty $regPath | where {$_.psChildname -like "{26A24AE4-039D-4CA4-87B4-2F03217071FF}" -and $_.DisplayVersion -eq "7.0.710" -and $_.WindowsInstaller -eq 1}).InstallLocation
$jqs=join-path (join-path $javaPath "bin") "jqs.exe"
if (test-path $jqs) {
	Execute-Process -Path "$jqs" -Parameters "-unregister" -WindowStyle Hidden -ContinueOnError $true
}
$runKey="HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
$run=Get-Item $runKey
if ($run.GetValue("SunJavaUpdateSched",$null)) {
	remove-itemProperty -Path $runKey -Name "SunJavaUpdateSched"
}
if ($is64Bit) {
$runKey="HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run"
$run=Get-Item $runKey
if ($run.GetValue("SunJavaUpdateSched",$null)) {
	remove-itemProperty -Path $runKey -Name "SunJavaUpdateSched"
}
}
</install>
<uninstall/>
<detection/>
</appdefinition>
This entry was posted in automateAppDeployment, Configuration Manager, Deutsch, Powershell, System Center, System Center 2012 and tagged , , . Bookmark the permalink.

2 Responses to ConfigMgr: Oracle JRE 7u71 bereitstellen

  1. Pingback: ConfigMgr: Oracle JRE 7u75 verteilen | Markus Bäker

  2. Pingback: ConfigMgr: Softwarepaketierung Übersicht | Markus Bäker

Leave a Reply