SharePoint 2013 Kurulum Hatası

Hasan Köroğlu 27 Nisan 2016 0
SharePoint 2013 Kurulum Hatası
  • Sumo

Merhaba Arkadaşlar,

Bu makalemizde sizlere SharePoint 2013 kurulumu sırasında alınan

Setup is unable to proceed due to the following error(s): This product requires Microsoft .Net Framework 4.5

hatanın sebebi ve çözümünden bahsedeceğim.

Bu hatanın sebebi arkadaşlar; SharePoint kurulumu için .Net Framework 4.5 gerekmektedir. Ama sisteminizde .Net 4.5 kurulu olduğuna rağmen bu hatayı alabilirsiniz. Çünkü SharePoint 2013 kurulumu öncesi Windows Server’ınızın updatelerini yaptığınız sırada Windows Update sisteminize .Net 4.6 kuruyor. Bu sebeple ki SharePoint kurulumu sisteminizde .Net 4.5 yok zannediyor.

Bu sorunu düzeltmek için İsterseniz aşağıdaki scripti çalıştırabilir veya manuel olarak registry üzerinde ilgili kaydı düzeltebilirsiniz.

Sisteminizde .Net Framework’un hangi versiyonunun kurulu olduğunu öğrenmek için aşağıdaki PowerShell komutunu çalıştırabilirsiniz.

[code lang=”powershell”]Set-Location ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client’ Get-ItemProperty -Path . | Select-Object Version[/code]

 

Veya Regedit’ten HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client kısmından Version anahtarının değerine bakabilirsiniz.

Bu değerlerin SharePoint 2013 kurulumu için “4.5.5150” olması gerekmektedir. Değiştirmeniz gereken yerler:

  • HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client
  • SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client\1033
  • SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
  • SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\1033

Burada yer alan “4.6.00079” değerini “4.5.5150” değeri ile değiştirmeniz gerekmektedir.

Eğer bu işlemi PowerShell ile yapmak isterseniz aşağıdaki kodu kullanabilirsiniz.

[code lang=”powershell”]#######################
# Need PowerShell 5.0 https://www.microsoft.com/en-us/download/details.aspx?id=48729

#Enable-Privilege function found from Technet Article here (http://bit.ly/1VVOSAm)
Function Enable-Privilege {
Param(
$Privilege,
$ProcessId = $pid,
[Switch] $Disable
)

$Definition = @”
using System;
using System.Runtime.InteropServices;

public class AdjPriv {
[DllImport(“advapi32.dll”, ExactSpelling = true, SetLastError = true)]
internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall,
ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr relen);

[DllImport(“advapi32.dll”, ExactSpelling = true, SetLastError = true)]
internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok);

[DllImport(“advapi32.dll”, SetLastError = true)]
internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid);

[StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid {
public int Count;
public long Luid;
public int Attr;
}

internal const int SE_PRIVILEGE_ENABLED = 0x00000002;
internal const int SE_PRIVILEGE_DISABLED = 0x00000000;
internal const int TOKEN_QUERY = 0x00000008;
internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;
public static bool EnablePrivilege(long processHandle, string privilege, bool disable) {
bool retVal;
TokPriv1Luid tp;
IntPtr hproc = new IntPtr(processHandle);
IntPtr htok = IntPtr.Zero;
retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);
tp.Count = 1;
tp.Luid = 0;
if(disable) {
tp.Attr = SE_PRIVILEGE_DISABLED;
}
else {
tp.Attr = SE_PRIVILEGE_ENABLED;
}
retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);
retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
return retVal;
}
}
“@
$ProcessHandle = (Get-Process -id $ProcessId).Handle
$Type = Add-Type $Definition -PassThru
$Type[0]::EnablePrivilege($ProcessHandle, $Privilege, $Disable)
}

$Items = “SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client”,
“SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client\1033”,
“SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full”,
“SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\1033”

$CurrentUser = [System.Security.Principal.NTAccount]”$env:USERDOMAIN\$env:USERNAME”

$Items | ForEach-Object {
$Item = $_
$Path = “HKLM:\$Item”

Enable-Privilege SeTakeOwnershipPrivilege
$Key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($Item,
[Microsoft.Win32.RegistryKeyPermissionCheck]::ReadWriteSubTree,
[System.Security.AccessControl.RegistryRights]::TakeOwnership
)
$ExistingACL = $Key.GetAccessControl()
$ACL = $Key.GetAccessControl([System.Security.AccessControl.AccessControlSections]::None)

$ACL.SetOwner($CurrentUser)
$Key.SetAccessControl($ACL)

$ACL = $Key.GetAccessControl()
$Rule = New-Object System.Security.AccessControl.RegistryAccessRule ($CurrentUser,”FullControl”,”Allow”)
$ACL.SetAccessRule($Rule)
$Key.SetAccessControl($ACL)

Try {
$Value = Get-ItemPropertyValue -Path $Path -Name “RealVersion”
Set-ItemProperty -Path $Path -Name “Version” -Value $Value.Trim()
Remove-ItemProperty -Path $Path -Name “RealVersion”
} Catch [System.Management.Automation.PSArgumentException] {
$Value = Get-ItemPropertyValue -Path $Path -Name “Version”
New-ItemProperty -Path $Path -Name “RealVersion” -Value $Value
Set-ItemProperty -Path $Path -Name “Version” -Value “4.5.5150”
}

$Key.SetAccessControl($ExistingACL)
}
[/code]

Yorum Bırak »