ConfigMgr: Java 8 Update 101

Anbei das aktualisierte Installationsscript für Java 8u101:

<appdefinition>
<file>jre-8u101-windows-i586.exe</file>
<hash type="SHA256">8FAC3FBB9E854BCEE12049430E9EF67188C6389B46C67120E873CDF173B3C3B9</hash>             
<info>
	<setupType>InnoSetup</setupType>
	<isX86>true</isX86>
	<company>Oracle Corporation</company>
	<productName>Java 8 Update 101</productName>
	<msiProductCode>{26A24AE4-039D-4CA4-87B4-2F32180101F0}</msiProductCode>
</info>
<install>
Show-InstallationProgress -StatusMessage 'Installing Java JRE. This may take some time. Please wait...'
$path=join-path (join-path $env:programdata 'Oracle') 'Java'
if ((Test-Path $path) -eq $false) {
   New-Item -Type Directory $path |out-null
}
new-item -type File (join-path $path 'java.settings.cfg') -force | out-null
if ($is64Bit) {
	$path=join-path $envWinDir "System32\config\systemprofile\AppData\LocalLow\Oracle"
	$symName=join-path $envWinDir "SysWOW64\config\systemprofile\AppData\LocalLow\Oracle"
	if  (Test-Path $symname) {
		remove-Item -Recurse -Path $symName
	}
	if (-not (Test-Path $path)) {
		new-item -ItemType Directory -Path $path
	}
	#Quelle: https://gallery.technet.microsoft.com/scriptcenter/New-SymLink-60d2531e
	        Try {
	            $null = [mklink.symlink]
	        } Catch {
	            Add-Type @"
	            using System;
	            using System.Runtime.InteropServices;
	 
	            namespace mklink
	            {
	                public class symlink
	                {
	                    [DllImport("kernel32.dll")]
	                    public static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, int dwFlags);
	                }
	            }
"@
	        }
	            Try {
	                $return = [mklink.symlink]::CreateSymbolicLink($SymName,$Path,1)
	            } Catch {
	            }
}

Execute-Process -Path "jre-8u101-windows-i586.exe" -Parameters "/s INSTALL_SILENT=Enable AUTO_UPDATE=Disable WEB_JAVA=Disable WEB_ANALYTICS=Disable REBOOT=Disable NOSTARTMENU=Enable SPONSORS=Disable" -WindowStyle Hidden
</install>
<uninstall>
Execute-MSI -Action Uninstall -Path "{26A24AE4-039D-4CA4-87B4-2F32180101F0}"
</uninstall>
<detection>
if ([IntPtr]::Size -eq 8) {$regPath="HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"} else { $regPath="HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"}
Get-ItemProperty $regPath | where {$_.psChildname -like "{26A24AE4-039D-4CA4-87B4-2F32180101F0}" -and $_.DisplayVersion -eq "8.0.1010.13" -and $_.WindowsInstaller -eq 1}
</detection>
<dependency>
</dependency>
<supersedence>
<deploymentType uninstall="true" type="SHA256">67C9594D2A51D6B1B52CC57CD7E1B320B491207C3680F811354185B71ED4D832</deploymentType>
<deploymentType uninstall="true" type="SHA256">8371F27009A9286CAC0D9812E0411DDBFCB106456E46FFEC50E64054E75E4632</deploymentType>
<deploymentType uninstall="true" type="SHA256">E4E54109C3FB40A36457B4EAC5C53D667A9969826EB16157B0DC4A2D3DCEAC23</deploymentType>
<deploymentType uninstall="true" type="SHA256">41F1887CBC9446720B26F51B9EDD6034D535A2F844A6E37646333F7799F35809</deploymentType>
<deploymentType uninstall="true" type="SHA256">3CC0BE2A34F0989692C30F2CACB89CACFCA7159570D5FC8C1B1498C60CBC07FB</deploymentType><!--71-->
</supersedence>
</appdefinition>
This entry was posted in automateAppDeployment, Configuration Manager, Deutsch, System Center and tagged , , , . Bookmark the permalink.