SharePoint Patch Installation Issues and Fixes - 1

Introduction 
 
The installation of cumulative updates on SharePoint servers is a task which all the organizations must work on in order to keep their farms updated. There are several challenges encountered during this process. The first step is to install the patch files on each server. Let's see the most common issues faced during this step and how can we fix them.
 
"An error encountered while running detection"
 
Cause
 
This error occurs when the required MSI and MSP files are missing from C:\Windows\Installer folder. The patch .exe is running checks for all the required installer files in the C:\Windows\Installer folder. If any file is missing, then it gives the error "An error encountered while running detection."
 
Solution
 
The first thing to do is check for a healthy server on which you are able to execute the patch .exe file without this error.  This means that the healthy server has all the required MSI/MSP installer files required by the update. The next step is to copy all those missing files from the healthy server to your impacted server. This cannot be a direct copy/paste.
Follow the below steps:
  1. Run ROIScan.vbs on the impacted server. This will list all the missing files from the installer folder. You can download this file from here.
  2. Make sure that Oputil.vbs is there in C:\Windows\System32 folder. If not, then download it from here.
  3. Now open Windows powershell and go to C:\Windows\System32. Then, run the below command:

    cscript.exe Oputil.vbs /srestorelocation=\\<workingservername>\c$\windows\installer”

  4. This will restore all the files from the working server. Then you can execute the patch .exe file and it should fix this issue.
Note: Never delete any file from the installer folder
    
"Installation of this package failed"
 
Cause
 
There are mainly two causes of this issue:
  1. There is not enough space present in C: drive of the server, 
  2. The .exe and .cab files downloaded from Microsoft site have issues.
Solution
 
Make sure there is enough space available in the drives of your server.
Download the patch installation files again from the Microsoft website.
 
Check my next blog for more issues with their fixes.