Solution for Error 17002 when uninstalling Office 365 (2016) when apps like word, excel, outlook are open

When uninstalling office 365 silently, it is failing only when any applications like word, excel are kept open. This is because during uninstall, office checks for any running applications and prompts the user to close it which is not happening in silent uninstall.


When uninstalling in UI mode, it prompts to close when any office apps are open. Since in silent mode office is not able to do this, it fails with an error code 17002.




You can check in the log file for the error code 17002.





To overcome this just add the property FORCEAPPSHUTDOWN with Value="True" in the uninstall config.xml file. This property will force shutdown any running office apps.


Example:


<Configuration>
 <Remove>
 <Product ID="O365ProPlusRetail" >
 <Language ID="en-us" />
  </Product>
 </Remove>
<Property Name="FORCEAPPSHUTDOWN" Value="TRUE" />
<Display Level="None"/>
<Logging Path="c:\temp\" Name="Uninstall.log"/>
</Configuration>


NOTE:


Place  the  <Property Name="FORCEAPPSHUTDOWN" Value="True" /> part after  the <Remove>... </Remove> tags. If it is placed in between <Remove>... </Remove> tags, then it wont work.


You can use the below online configuration xml editor to avoid issues when editing the XML file.


http://officedev.github.io/Office-IT-Pro-Deployment-Scripts/XmlEditor.html

No comments:

Post a Comment