Ugh, patching servers.  Yet another reason to move to SharePoint Online.  I recently started another patching process as the servers were getting out of date and needed to have the environments upgraded.  So while doing one server in particular I ran into a snag where the installer wouldn’t even run past the detection point.  It simply kicked off and immediately returned the error “An Error Occurred While Running Detection”

An Error Occurred While Running Detection - Error Message

I am going to go over the different steps I took to resolve this issue.  I am even going to list the ones that should have worked but didn’t in case they will work for you.

Find the Log File

The first thing you are going to want to do is find the log file.  The easiest way to do this is while logged in with the account you were running the install on open Windows Explorer and navigate to %temp%.  You may have to move up one level (on this server the temp location was a sub of the folder I wanted).  What you are looking for is a file called opatchinstall(X).log (where X is a number).  Every time you run update process this log file is created (if you haven’t run it yet there will not be a (X)).  You want the latest file.  Open that file, but also navigate to the office error code site (I know it is 2010, but the codes are the same).  In the file go to the bottom and perform an upwards search for SYS.PROC.RESULT.  Now cross reference that error with the one on the list.  In my case I had 17044 which cross references to “Installer was unable to run detection for this package.”  Ok, so far so good.  Now keep searching for that SYS.PROC.RESULT string.  You are likely going to find a lot.  In my case I had many 17303 (Error: Extracting file) and 17024 (Error: Creating folder failed) errors.

Re-Download the Patch

Navigate to the address you downloaded the patch from and re-download it.  There is a slight possibility you have a corrupted CU or CAB file.  Also make sure when you run the patch that the CAB files are located in the same folder as the patch executable.  Re-run the patching process.  By the way, I suggest using the process developed by Russ Maxwell for SharePoint 2013 or the enhanced version updated by Trevor Seward for SP2013 and SP2016.  There is also SPPatchify written by Jeff Jones, but I would not use that here simply because you are having issues with this server and SPPatchify is designed to update the entire farm in one run.  If you have the same problem after running the re-downloaded patch, move on to the step which actually worked for me.

Rebuild SharePoint 2013 Installation

I was getting no where with the update process.  So finally decided to rebuild the installation since it was Dev (be prepared to do this in other environments if you need).  To do this:

  1. Click on Start and Control Panel
  2. Open Programs and Features
  3. Find SharePoint 2013 and highlight it
  4. Click on Change.
  5. Ensure Repair is selected and click Continue

Now if you system was as broken as this one was your repair is going to fail.  No errors will be displayed.  To find out what happened go back to your Temp folder opened above and look this time for a file called SetupExe(yyymmddXXXXXXXX).log (where X is random letters and numbers)  You’ll probably find the errors at the end of the log file.  In my case, the error didn’t help me any.  However, you have one trick up your sleeve.  And that’s the command line.  Find out where SharePoint 2013 MSI package file (oserver.msi) is.  Then open a command window with admin rights and run the following command:

msiexec /f <location of oserver.msi>

The /f is a flag to repair the install.  Now this doesn’t fix the actual installation of SharePoint, but it fixes the install enough that you can now run the rebuild.  So repeat the steps above.

Once the rebuild is complete reboot the server.

A New Challenger Approaches

So after the rebuild and reboot, I reran the install.  It seemed to be going fine until the detection completed and I received a new error message: “The expected version of the product was not found on the system.”

An Error Occurred While Running Detection - Expected Version Error

So this is the error you receive if you haven’t yet patched to SP1.  I jumped on Central Admin and took a look at the config server version.  It was at the expected level of May2016 (Remember I said it’s been a while).

An Error Occurred While Running Detection - Config Database Version

However when I went to the Product and Patch installation status screen in the Upgrade and Migration section of Central Admin I found the installation had reverted back to RTM version.

An Error Occurred While Running Detection - Installed Feature Version

I guess this makes sense, but I had assumed it would apply the same patch level as that which was already installed.

Re-Install Service Pack 1

So next I downloaded and tried my update process with the SP1 file.  Using the same Russ Maxwell process outlined above I was able to successfully install SharePoint 2013 Service Pack 1 on the server.  Remember to run the psconfig.  After reading this post a couple of years ago by Stefan Gossner I prefer to use the GUI version of psconfig, but it is up to you.

Re-Install the SharePoint CU Patch

Finally attempt a re-install of the SharePoint CU Patch you were originally trying to install. You should be good to go now.  Let me know if you run into any snags or failures.  I’ll do my best to help out.


Thanks for reading!!