Wednesday, February 27, 2013

SharePoint 2013: Repairing an Installation on a Web Front End

I was having issues with a particular SharePoint 2013 server in our stage environment. I was down to the point of uninstalling and reinstalling SharePoint 2013 but I decided to try a repair first. However, running a repair from Control Panel -> Programs and Features gave me an installation error as shown below and I could not move forward:


Error 1706. Setup cannot find the required files. Check your connection to the network or CD-ROM drive.

If you have the same problem - have no fear. We have a friend named "msiexec" which can be run from any command prompt including PowerShell. Simply open a command prompt and enter the following:

msiexec /f <install folder>\global\oserver.msi

This will perform a repair similiar to doing it from Control Panel -> Programs and Features for SharePoint Server 2013. The '/f' means to repair (fix comes to mind). There are other options that you may use with /f. You can always run msiexec /? to see the other repair options but I'll save you the trouble:

  p - only if file is missing
  o - if file is missing or an older version is installed (default)
  e - if file is missing or an equal or older version is installed
  d - if file is missing or a different version is installed
  c - if file is missing or checksum does not match the calculated value
  a - forces all files to be reinstalled
  u - all required user-specific registry entries (default)
  m - all required computer-specific registry entries (default)
  s - all existing shortcuts (default)
  v - runs from source and recaches local package

So /fp would repair and replace files only if they were missing. Issuing '/f' by itself is the same as '/foums' essentially.

That repair runs fairly quickly but there are other main installs that you can attempt to repair:

SharePoint Server 2013 (one from above)
msiexec /f <install folder>\global\oserver.msi

SharePoint Shared Components
msiexec /f <install folder>\global\shared\osrv.msi

SharePoint Foundation 2013 Core
msiexec /f <install folder>\global\wss\sts.msi

SharePoint Portal
msiexec /f <install folder>\global\sps\spswfe.msi

Search Server 2013 Core
msiexec /f <install folder>\global\search\osrchwfe.msi

If you have other components that need fixin', take a look in the global folder - most of the sub-folder names give a clue to what they contain.





 

9 comments:

  1. Do you have an idea where I can find the fix for the App Management Service? It has been hanging on start and stop. Finally out of desperation I deleted it, I was sure a repair would bring it back (as it did with another service) unfortunately no luck. Any help would be greatly appreciated!

    ReplyDelete
    Replies
    1. Resolved. Just in case someone does the same thing...

      Install-SPService

      That powershell command brings it back.

      Thanks again.

      Delete
  2. Do you know what the source folder is to repair the User Profile Synchronization service?

    ReplyDelete
    Replies
    1. Check under global\ppl

      However, sometimes the best way to fix the UP service application is to remove it and recreate it.

      Delete
  3. Hi - wonder if you can help ... i have an installation that has lost it's association with the farm:-
    get-SPFarm | select servers
    Servers

    But when you query the server is it acched, it comes with blank:-
    get-SPFarm | select joined
    Joined " " (ie, blank).

    Thanks for any help.

    Sanjay

    ReplyDelete
    Replies
    1. Run the SharePoint Products Configuration Wizard on that server.

      Delete
  4. Thanks Steve - have tried that already.
    The config wizard suggests we detach and re-attach but when we detach that is where the problem starts as when we run the configuration again it says the url is already in use and wants us to replace the default or create a new one and neither work.

    ReplyDelete

Matched Content