brianlala / AutoSPInstaller

Automated SharePoint 2010/2013/2016/2019/SE PowerShell-based installation script.
https://autospinstaller.com
MIT License
170 stars 80 forks source link

Issue when checking for installed language packs #83

Closed farapholch closed 2 years ago

farapholch commented 2 years ago

Installations fails when checking for language packs for SPSE at line 237 (spver is being used in main):

$languagePackInstalled = (Get-Item -Path "HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\$spVer.0\WSS\").GetValue("LanguagePackInstalled")

Error message: System.Management.Automation.ItemNotFoundException: Cannot find path 'HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\.0\WSS\' because it does not exist.

One way to solve it is to add new hashtable at line 33 as below (Copied from function Get-MajorVersionNumber) :

$spVersions = @{"2010" = "14"; "2013" = "15"; "2016" = "16"; "2019" = "16"; "SE" = "16"} # SharePoint 2019 and SPSE still use major build 16