A system restart from a previous installation or update is pending

While building a SharePoint 2013 environment, I came across this error when running SharePoint 2013 installation.

A system restart from a previous installation or update is pending

The pre-requisites wizard had successfully installed the required dependencies and restarted several times. And so did I manually restarted the server but in vain.  Looks like this was due to a registry entry that did not clear the session state from pending restart to clear. So, change the following registry key and re run the installation. Lo and behold, the installation started. But make sure you have restarted the server before you make these changes to ensure any genuine pending request for restart are cleared.

Open the Registry editor (run > regedit)
•Navigate to this path “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager“
•Rename the “PendingFileRenameOperations” value to “OldPendingFileRenameOperations“
•Reboot the server

Now proceed with a clean install.

 

 

Microsoft .Net 4.5 error while installing SharePoint 2013

Microsoft .Net 4.5 error while installing SharePoint 2013

Lately, while building a SharePoint 2013 farm, I came across this error on all my web front ends and application servers.

Setup is unable to proceed due to the following error(s):

This product requires Microsoft .Net Framework 4.5.

It was quite a frustrating experience since Microsoft .Net Framework 4.5 was installed and I verified it by running pre requisite installer again. After spending some time on this, I found this support article on Microsoft’s site. According to the site, the problem occurs because This problem occurs because the SharePoint Setup program does not recognize the .NET Framework 4.6 or 4.6.1 as a supported version of the .NET Framework.

To solve this problem, Microsoft .NET Framework 4.6x has to uninstalled from the servers when you run the setup. You can install them after that.

  1. Uninstall the .NET Framework 4.6x using Programs and Features or .NET Framework Cleanup Tool.

  2. Restart the server. This is very important step.
  3. Run the SharePoint 2013 Pre requisites tool again.
  4. Run SharePoint 2013 setup to install SharePoint again.

.NET 4.6 can be installed after SharePoint has been installed.

However, my problem didn’t end here for after every reboot, .NET Framework 4.6.x came up which prompted me with the error again.

So it seems that this Windows update “KB3045563” would get installed and configured every time the server reboots. I tried searching for that patch under Programs and Features but in vain. So I found that KB3102467 is the KB that’s being installed as part of the updates. But then I was unable to uninstall this KB through Programs and Features so I used the PowerShell snippet from here and made few tweaks for Windows Server 2012 R2. Finally, I was able to run SharePoint 2013 installation.

I wouldn’t advise to do this while building a new production environment. Instead, chose to rebuild the server with minimal updates.