Installation of SharePoint Foundation fails due to missing HKLM : InstalledLanguages key
description
Installation of SPF fails with an error message that a regkey InstalledLanguages cannot be found.
this is apparently not created during SPF Installation but is assumed to exist in the InstallLanguagePacks function
proposal for correction :
Function InstallLanguagePacks([xml]$xmlinput)
{
WriteLine
#Get installed languages from registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\InstalledLanguages)
# Offending line
#$InstalledOfficeServerLanguages = (Get-Item "HKLM:\Software\Microsoft\Office Server\14.0\InstalledLanguages").GetValueNames() | ? {$_ -ne ""}
# JJ.1 Updated to work with SP2010 Foundation that does not set language Keys on install
$KeyIL = Get-Item "HKLM:\Software\Microsoft\Office Server\14.0\InstalledLanguages" -EA 0
if ($KeyIL -ne $null ) {
$InstalledOfficeServerLanguages = $KeyIL.GetValueNames() | ? {$_ -ne "" }
} else {
$InstalledOfficeServerLanguages = $null
}