SPInstallLanguagePack: error installing german language pack in SP2019
See original GitHub issueDetails of the scenario you tried and the problem that is occurring
When installing german language pack on a new farm I receive the error message “… failed to execute Test-TargetResource functionality with error message: Unknown folder structure” See also #443 I cannot confirm the “Issue fixed in PR #454” mentioned in that issue…
Verbose logs showing the problem
I’m afraid that wohnt help much, but here we are:
{… “verbose”, “message”: "[MyServer]: LCM: [ Skip Set ] [[SPInstall]SharePointInstall] "}, {… “verbose”, “message”: "[MyServer]: LCM: [ End Resource ] [[SPInstall]SharePointInstall] "}, {… “verbose”, “message”: "[MyServer]: LCM: [ Start Resource ] [[SPInstallLanguagePack]GermanLanguagePack] "}, {… “verbose”, “message”: "[MyServer]: LCM: [ Start Test ] [[SPInstallLanguagePack]GermanLanguagePack] "}, {… “verbose”, “message”: “[MyServer]: [[SPInstallLanguagePack]GermanLanguagePack] Testing install status of SharePoint Language Pack”}, {… “verbose”, “message”: “[MyServer]: [[SPInstallLanguagePack]GermanLanguagePack] Getting install status of SharePoint Language Pack”}, {… “verbose”, “message”: “[MyServer]: LCM: [ End Test ] [[SPInstallLanguagePack]GermanLanguagePack] in 0.3750 seconds.”}, {… “error”, “message”: "PowerShell DSC resource MSFT_SPInstallLanguagePack failed to execute Test-TargetResource functionality with error message: Unknown folder structure "}, {… “verbose”, “message”: "[MyServer]: LCM: [ Start Resource ] [[xPendingReboot]AfterSPInstall] "},
I digged into the sources and found the edited line of PR #454, but that doesnt help. I dont understand, how this code worked on any language pack installation on SP2016 or SP2019 since then! When extracting the exe of a language pack of SP2016/2019 we get a flat structure. There are no folders at all (so no “\osmui.de-de”), as mentioned in #443. But there are 3 files of the 43 files that begin with “osmui”: “…\osmui.xml” “…\osmui.cab” “…\osmui.msi” So when checking for “\osmui*.*” (as in function Get-TargetResource) you get as result ‘0’ (when you have wrong path or something) or you get ‘3’. But you never get never only one - the only result, that would prevent the error “Unknown folder structure”: Here is the code:
$osrvFolder = Get-ChildItem -Path (Join-Path -Path $BinaryDir -ChildPath "\osmui*.*")
if ($osrvFolder.Count -ne 1)
{
throw "Unknown folder structure"
}
Even when by what coincident ever this code would continue, we will crash some lines further on, when the content of $osrvFolder is used:
# Extract language from filename
if ($osrvFolder.Name -match "\w*.(\w{2,3}-\w*-?\w*)")
{
$language = $matches[1]
}
Because the folder “osmui.de-de” doesnt exist any more in 2016/2019 lang packs, we cannot derive the “de” (or what localisation code it may have) from it. $language will always contain crap, that cant be used to compare with the installed language packs.
Suggested solution to the issue
To get the local, we could read the “osmui.xml”. It has a “Package” element, that contains in “ProductLanguage” the localeID (“1031”): <Package Id="osmui.de-de" Type="MSI" Path="osmui.MSI" Version="1.0" ProductCode="{90160000-1168-0407-1000-0000000FF1CE}" MSIVersion="16.0.10337.12109" ProductLanguage="1031" Platform="x64"> And it is XML so we could avoid regexps … For SP2013 we would have to add the folder “\osmui.de-de” to find the “osmui.xml” one level deeper, but it is there and in the same format.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
SPInstallLanguagePack GermanLanguagePack
{
BinaryDir = $ConfigurationData.SharePoint.Settings.LangpackPath
DependsOn = "[SPInstall]SharePointInstall"
PsDscRunAsCredential = $credsSPSetup
}
The operating system the target node is running
OsName : Microsoft Windows Server 2016 Standard OsOperatingSystemSKU : StandardServerEdition OsArchitecture : 64-bit WindowsBuildLabEx : 14393.2724.amd64fre.rs1_release.181231-1751 OsLanguage : en-US OsMuiLanguages : {en-US}
Version of SharePoint that is used (e.g. SharePoint 2016)
SharePoint 2019
Version and build of PowerShell the target node is running
PSVersion 5.1.14393.2636 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} BuildVersion 10.0.14393.2636 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Version of the DSC module that was used (‘dev’ if using current dev branch)
“3.1.0.0 (current version)” from 15.01.2019
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Oooops. You are right. I “extracted” by unzipping and then you get a flat hierarchy. Damned. I should have checked that with the “extract” option. Sorry for that!!!
To make the best of it, this post can be found by all admins that made the same mistakes 😉
Glad it helped.