Uninstall or Disable Office Web Apps?

Uninstall or Disable Office Web Apps?

  • Comments 8

Although there’s very small chance for people to decide to disable/uninstall Office Web Apps from their farm, sometimes this is still required, for example if customer has licensing issues.

When Chris Givens was working on 10174 training course he noticed that the uninstall did not go smoothly as he thought. I was working with him and reviewing the content as the content owner from a Product Manager’s perspective, and got notified as well. However a lot of things happened afterwards so I didn’t have time to look at it until now.

Here’re a few points you must remember when you want to uninstall Office Web Apps:

  • Uninstall Office Web Apps will remove the server from the SharePoint Farm. If you read the notification carefully when you click the uninstall button you will know this.
  • All web applications and sites created by SharePoint will be deleted from IIS.
  • You can rejoin the machine back to the Server Farm by psconfig with your farm passphrase.
  • You need to redeploy customizations to the server.
  • If this happens to be the server which hosts Central Administration, you need to rebuild the CA. This can be done through the Management Shell: New-SPCentralAdministration -Port xxxx -WindowsAuthProvider "NTLM"

If you can tolerance server down time then maybe it’s fine for you. Otherwise the whole process are not that pleasant. So how about just disable it like this:http://technet.microsoft.com/en-us/library/ee837418.aspx ?

To deactivate the Office Web Apps Feature on a single site collection by using Windows PowerShell

Using Notepad, open a new text file and then copy and paste the following script into the file.

$webAppsFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OfficeWebApps"}).Id 
$singleSiteCollection = Get-SPSite -Identity http://<site_name> 
Disable-SPFeature $webAppsFeatureId -Url $singleSiteCollection.URL

Hmm, in fact this will not completely disable the feature. You have to enable “Open in Client” feature as well, then all files can be opened in Office clients instead of the browser. However if you visit the server without Office client installed or using something like Safari/Chrome, you will still be redirected to the Office Web Apps page like WordViewer.aspx even you have deleted the service applications, stopped the related services.

Why? Because the modification to the drop down menu and open behavior by Office Web Apps cannot be turned off using those ways. Of course, a full uninstall will work – but like what I listed above, it has many cons. Luckily this is not the end of the world. With a few hours work I identified the change made by Office Web Apps and confirmed with the product team. Here’s my findings:

The reason why you can see those drop down menus with items like “Edit in Browser” is because the XML definition is changed. Take this one as an example:

c:\program files\common files\microsoft shared\web server extensions\14\template\xml\serverfilesword.xml

Content:

<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<ServerFiles>
    <Mapping FileExtension="doc"  RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
    <Mapping FileExtension="dot"  RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
    <Mapping FileExtension="docx" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
    <Mapping FileExtension="docm" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
    <Mapping FileExtension="dotx" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
    <Mapping FileExtension="dotm" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
</ServerFiles>

The purpose of this file is to tell SharePoint that if it has such doc files within a doc lib, use the redirect url template to process it. So what we will do is to simply remove this file or comment out the section to make it looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<ServerFiles>
<!--
    <Mapping FileExtension="doc"  RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
    <Mapping FileExtension="dot"  RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
    <Mapping FileExtension="docx" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
    <Mapping FileExtension="docm" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
    <Mapping FileExtension="dotx" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
    <Mapping FileExtension="dotm" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
-->
</ServerFiles>

Then do the same to serverfilespowerpoint.xml. Unless you are using standard CAL, there’s no need to touch Excel Services since it’s a part of Enterprise CAL and is not installed by Office Web Apps.

Then combine this change with the disable of Office Web Apps feature and the enable of Open in Client feature, Office Web Apps can be disabled completely on the site collection from a user experience perspective. You can also stop the related services and service applications.

 

Jie.

Leave a Comment
  • Please add 8 and 4 and type the answer here:
  • Post
  • Hi,

    i have just uninstalled Office web apps, i didn't know that it would delete all my web applications.

    I'm totally shocked now.

    i had a standalone sharepoint server.

    Do you know how can i restore my farm?

    Hope you can help me

    Thanx

  • @nora

    Please rerun psconfig and rejoin the machine to the farm - even you are running a standalone server this still applies.

  • I did this last night and wanted to comment here, after I joined server back to farm, I had to restart all services, all service apps was still there, just had to grant rights back, secure store broke and had to create a new key after which my ECTs that was using SS worked fine, all my web apps and IIS sites and site collections were still there, one interesting thing was I had deployed an ECT created in VS2010 , it was not there in metadata store, I could see other ECTs created in SPD, underlying wsp  solution was there in solution store, anyways redeploying from vs solved that issue. I'm back in business fully, What ever happened to uninstalling cleanly?

  • One thing worth pointing out is I hadn't activated OWA feature, wondering my sites/web apps were spared because of that

  • Hi Jie Li,

    I have the below query related with this topic:

    "We have currently an issue when opening documents with the client . This a SharePoint 2010 Farm installation without Office Web Apps. Recently we have been raised the situation that everytime users open the documents the default is do it on the browser. After checking the document library settings of the site collections we could see that the default was displaying to "open in the browser". To resolve this we have applied manual changes on the Farm in order to start opening only in the client.

    We have followed the below article from technet and run the PS command to change the default behaviour to open on the client.:

    technet.microsoft.com/.../ee837425.aspx

    "$defaultOpenBehaviorFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OpenInClient"}).Id

    Get-SPSite -limit ALL |foreach{ Enable-SPFeature $defaultOpenBehaviorFeatureId -url $_.URL }"

    After the script all the sites collections were configured to open with the client as default. However we notice today that newly created site collections do not have the same default applied behaviour, it shows up the "open in the browser" as default on the library settings.

    I have rechecked the "Open Documents in Client Applications by Default feature" and is activated on the Central Administration ->Site Collection Administration->Features.

    Also on the Web Application settings (Authentication Providers) the "Client Integration" is enabled.

    Did anyone face this issue before and/or know how to possibly resolve this for all site collections that will be created in the future?

    "

  • Hi,

    I modified both xmls, disabled office web app feature and enabled open in client feature. But still I am not able to save my attachment from a SharePoint list(right click, save as).

    For our users who dont have office installed and use chrome/safari, they have problem accessing all lists' attachment.

    any work around for it?

  • Great! Thanks!

    We had problems with Excel Services and even without Office Apps ever installed. Sharepoint wanted to open Excel files in browser ever.

  • Hi Li,

    You solved my problem!

    Thanx

Page 1 of 1 (8 items)