locked
Command to uninstall Office 2016 and content/location of uninstall.xml file RRS feed

  • Question

  • Command to install Office 2016 is as simply as it gets setup.exe. However I have trouble with command to uninstall Office 2016. It should be like this:

    setup.exe /uninstall ProPlus /config Uninstall.xml

    Uninstall.xml content is:

    <Configuration Product="ProPlus">
    <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
    <Setting Id="SETUP_REBOOT" Value="Never" />
    </Configuration>

    However uninstallation always fails with an error:

    Setup can't find or validate an installation file. Please try reinstall Office ...

    Last year I did the same with Office 2013 and I was able to uninstall it successfully. Are there some changes in Office 2016 from Office 2013 related to installation/unistallation switches, xml file format ...?

    • Edited by BoxiKG Friday, April 15, 2016 6:14 AM
    Wednesday, April 13, 2016 8:09 PM

Answers

  • Finally I cracked it:

    setup.exe /uninstall ProPlus /config config.xml

    where config.xml content is:

    <Configuration>
        <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
        <Logging Level="Standard" Path="%temp%" />
    </Configuration>

    Only difference but it seems to be the crucial one is Configuration tag where Product="ProPlus" is omitted. Office 2016 Configuration XML Editor was very helpful.


    • Marked as answer by BoxiKG Monday, April 18, 2016 7:25 AM
    • Edited by BoxiKG Monday, April 18, 2016 8:02 AM
    Monday, April 18, 2016 7:25 AM

All replies

  • Dear Sir,

    Thank you for posting in ConfigMgr 2012 Forum.

    ConfigMgr can deploy package with uninstall command program to clients for uninstalling Office 2016. If the command can't work normally, I think it's better to ask Office 2016 support team. They will provide more useful answeres.

    Office 2016 support:

    https://social.technet.microsoft.com/Forums/office/en-US/home?forum=Office2016setupdeploy

    Thanks in advance.

    Best regards

    Frank


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, April 14, 2016 2:15 AM
  • How exactly are you running the command? Through ConfigMgr or manually? If through ConfigMgr, are you using traditional package/program or application model?
    Thursday, April 14, 2016 2:58 AM
  • Application model, I deployed Office 2016 using ConfigMgr 2012 R2. Command for installing is setup.exe but I have trouble with command for uninstalling. I also tried to manually perform silent uninstallation on client itself from command prompt but to no avail. I always get the same error.
    Thursday, April 14, 2016 6:18 PM
  • If you can't perform the uninstallation manually, then it obviously won't work through SCCM.  I'd say to follow Frank's advice, and take this over to the Office 2016 forum.  They will have more knowledge about the proper command lines, and once you have those, you can likely drop them into SCCM without too much trouble.
    Thursday, April 14, 2016 6:21 PM
  • Ok, I will do that. Question was posted here because install/uninstall Office 2016 using SCCM 2012 R2 is suppose to be very common task for SCCM guys.
    Thursday, April 14, 2016 8:12 PM
  • If your uninstall.xml resides just next to the setup.exe, try manually running this: setup.exe /uninstall ProPlus /config %CD%\uninstall.xml or this: setup.exe /uninstall ProPlus /config .\uninstall.xml
    Friday, April 15, 2016 2:58 AM
  • Same error after: setup.exe /uninstall ProPlus config/ .\uninstall.xml. If, at least, it can be figured out whether error is caused by .xml file content itself or by the syntax of calling .xml script in command. I posted a question on Office 2016 forum but no one answered yet - I have lost too much time for this trivial thing, or at least it should have been trivial. :-(

    I guess location of uninstall.xml has no impact, in fact I read somewhere it should be located in the same folder (root) where setup.exe file resides.

    • Edited by BoxiKG Friday, April 15, 2016 6:18 AM
    Friday, April 15, 2016 6:11 AM
  • Same error after: setup.exe /uninstall ProPlus config/ .\uninstall.xml. If, at least, it can be figured out whether error is caused by .xml file content itself or by the syntax of calling .xml script in command. I posted a question on Office 2016 forum but no one answered yet - I have lost too much time for this trivial thing, or at least it should have been trivial. :-(

    I guess location of uninstall.xml has no impact, in fact I read somewhere it should be located in the same folder (root) where setup.exe file resides.

    Did you try the right command, the one you typed isn't right. should be /config not config/ How about adding logging to the uninstall.xml ? This could be done by adding this to your uninstall.xml

    <Logging Type="Verbose" Path="%Temp% Template="Office_2016_InstallLog.txt" />
    

    Also you might be using the wrong ProductID (ProPlus).. Is the Office downloaded from the VLSC or are you using click'n'run installer?


    Saturday, April 16, 2016 4:43 AM
  • Sunday, April 17, 2016 3:59 PM
  • Sorry, I meant /config. Office 2016 was downloaded from VLSC so its ProductID is ProPlus. I added logging and in log file:

    The Setup configuration file c:\Office2016x64\Uninstall.xml is not valid. Run Setup again without using a Setup configuration file, or fix the configuration file.

    Error: Type: Failed to load XML document ...Uninstall.xml, HRESULT=0x00000001. InvalidMetadataFile ErrorCode: 1(0x1).

    I have already lost too much time. Whatever source I have found on Internet uninstall.xml contains same lines as mine with exception of line Setting Id which some guys use some not.

    • Edited by BoxiKG Sunday, April 17, 2016 8:25 PM
    Sunday, April 17, 2016 7:28 PM
  • I can uninstall Office 2016 simply by typing setup /uninstall ProPlus but I would like to perform silent uninstallation.
    Sunday, April 17, 2016 7:29 PM
  • Finally I cracked it:

    setup.exe /uninstall ProPlus /config config.xml

    where config.xml content is:

    <Configuration>
        <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
        <Logging Level="Standard" Path="%temp%" />
    </Configuration>

    Only difference but it seems to be the crucial one is Configuration tag where Product="ProPlus" is omitted. Office 2016 Configuration XML Editor was very helpful.


    • Marked as answer by BoxiKG Monday, April 18, 2016 7:25 AM
    • Edited by BoxiKG Monday, April 18, 2016 8:02 AM
    Monday, April 18, 2016 7:25 AM
  • Why not use this:

    Setup.exe /configure configuration.xml

    Where the content of the XML is:

    <Configuration>
        <!--Uninstall complete Office 365 ProPlus-->
        <Display AcceptEULA="TRUE" Level="None" />
        <Logging Level="Standard" Path="C:\LogFiles\Office365ProPlusUninstall" />
        <Remove All="TRUE" />
    </Configuration>
    

    • Proposed as answer by GirtsR Thursday, December 29, 2016 8:18 AM
    Friday, June 3, 2016 9:51 AM
  • I tried your suggestion above and Office Pro Plus 2016 does uninstall.  But, the icon are still there.  How do we remove besides clicking on them and selecting remove?
    Wednesday, November 9, 2016 6:48 PM
  • If you are trying to uninstall Office365 2016 Download the Click to run for the proper version. The switches have been change and do not match any more. 

    Open a Command Prompt and Type Setup /help 

    Office Deployment Tool

    SETUP /download [path to configuration file]
    SETUP /configure [path to configuration file]
    SETUP /packager [path to configuration file] [output path]

    Now the Command Line is like this 

    setup.exe /configure uninstall.xml

    My XML Looks like this since I have Japanese loaded.

    Configuration>
        <Remove>
            <Product ID="O365ProPlusRetail">
                <Language ID="en-us"/>
                <Language ID="ja-jp"/>
            </Product>
        </Remove>
        <Display Level="None" CompletionNotice="no" SuppressModal="yes" AcceptEULA="TRUE"/>
    </Configuration>

     Only my XML and command line was able to remove the application directly from My MDT 2013 Share.  I am using a simple batch file to launch remove office from MDT 2013 as a task sequence or Can Add Run Command Line from the Task Sequence. 


    Thursday, December 15, 2016 4:20 PM
  • If you are trying to uninstall Office365 2016 Download the Click to run for the proper version. The switches have been change and do not match any more. 

    Open a Command Prompt and Type Setup /help 

    Office Deployment Tool

    SETUP /download [path to configuration file]
    SETUP /configure [path to configuration file]
    SETUP /packager [path to configuration file] [output path]

    Now the Command Line is like this 

    setup.exe /configure uninstall.xml

    My XML Looks like this since I have Japanese loaded.

    Configuration>
        <Remove>
            <Product ID="O365ProPlusRetail">
                <Language ID="en-us"/>
                <Language ID="ja-jp"/>
            </Product>
        </Remove>
        <Display Level="None" CompletionNotice="no" SuppressModal="yes" AcceptEULA="TRUE"/>
    </Configuration>

     Only my XML and command line was able to remove the application directly from My MDT 2013 Share.  I am using a simple batch file to launch remove office from MDT 2013 as a task sequence or Can Add Run Command Line from the Task Sequence. 


    I found this Website helpful on creating your own XML for any version of Office365

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

    Thursday, December 15, 2016 4:25 PM
  • Anyone know how to uninstall Visio Pro 2016 and Project Pro 2016 using setup.exe? I am trying to deploy Office365 to users and I have my Office 2016 ProPlus uninstall working fine but some users have Visio and Project. Those do not uninstall with ProPlus.
    Tuesday, January 31, 2017 3:57 PM
  • Anyone know how to uninstall Visio Pro 2016 and Project Pro 2016 using setup.exe? I am trying to deploy Office365 to users and I have my Office 2016 ProPlus uninstall working fine but some users have Visio and Project. Those do not uninstall with ProPlus.

    Check these https://technet.microsoft.com/en-us/library/jj219426.aspx and https://support.microsoft.com/en-us/help/2842297/product-ids-that-are-supported-by-the-office-deployment-tool-for-click-to-run
    Tuesday, January 31, 2017 8:57 PM
  • Anyone know how to uninstall Visio Pro 2016 and Project Pro 2016 using setup.exe? I am trying to deploy Office365 to users and I have my Office 2016 ProPlus uninstall working fine but some users have Visio and Project. Those do not uninstall with ProPlus.


    Check these https://technet.microsoft.com/en-us/library/jj219426.aspx and https://support.microsoft.com/en-us/help/2842297/product-ids-that-are-supported-by-the-office-deployment-tool-for-click-to-run

    I am actually looking to uninstall the Office 2016 (non-365) versions of Visio and Project. Those links are only for Office 365. But thanks for the links because I've been trying to build deployment packages for Visio 365 but not had any success.

    First, I tried building my configuration.xml as such to only download Visio Pro.

    <Configuration>
    
      <Add OfficeClientEdition="32" Branch="Current">
        <Product ID="VisioProRetail">
          <Language ID="en-us" />
        </Product>
      </Add>
    </Configuration>
    With this, it seems to still download the full Office 365 client. So I continued on and built an installer with the same configuration.xml. The packaged installation runs but it only put a shortcut to Visio in my start menu. It didn't actually install the binaries. When I click on the shortcut it cannot find VISIO.exe. So has anyone been able to successfully deploy Visio or Project 365 through SCCM?
    Wednesday, February 1, 2017 4:06 PM
  • As I find this a year later to the day. Thanks!
    Monday, April 17, 2017 12:46 PM
  • I dug long and hard to find this!!! Great work and thank you!!!
    Wednesday, April 19, 2017 12:45 AM
  • Hello,

    I am trying this but the office trows Error Code: 0-1008 (0).

    When running  setup.exe /configure uninstall.xml, don't we have to set the Office 365 directory:

    In the following xml, we do not say anything about source path:

    Configuration>
        <Remove>
            <Product ID="O365ProPlusRetail">
                <Language ID="en-us"/>
                <Language ID="ja-jp"/>
            </Product>
        </Remove>
        <Display Level="None" CompletionNotice="no" SuppressModal="yes" AcceptEULA="TRUE"/>
    </Configuration>

    how does the Setup.exe knows what to uninstall actually?

    BR,

    Viktor

    Thursday, June 21, 2018 11:28 AM
  • So.. I have been trying to do the same and tried two of the most talked about ways of doing this from this thread and others. Members BoxiKG and AITu85 got me close to what would work. Neither of their solutions alone worked for me so I used a combination of what they posted. This does work for me.  To uninstall Microsoft Office 2016 Pro Plus.

    Setup.exe /uninstall ProPlus /config c:\temp\Config.xml

    Contents of the config.xml:

    <Configuration>
     <Display AcceptEULA="TRUE" Level="none" />
     <Logging Level="Standard" Path="%Temp%" />
     <Remove All="TRUE" />
    </Configuration>

    Thursday, September 13, 2018 3:40 PM
  • Sorry to bump this, but can the Remove All element be integrated into the install script?

    e.g.

    Setup.exe /configure configuration.xml

    <Configuration>
    <Remove All="TRUE" />
    <Display Level="None" AcceptEULA="TRUE" />
    <Logging Name="OfficeRemoval.log" Path="%temp%" />
        <Add OfficeClientEdition="32" Channel="Targeted" OfficeMgmtCOM="True">
            <Product ID="O365ProPlusRetail">
            <Language ID="en-us" />
            </Product>
            <Product ID="VisioProRetail">
            <Language ID="en-US" />
            </Product>
            <Product ID="ProjectProRetail">
            <Language ID="en-US" />
        </Product>
        </Add>
        <Updates Channel="Targeted" Enabled="TRUE" />
        <Display Level="None" AcceptEULA="TRUE" />
        <Logging Level="Off" />
        <Property Name="FORCEAPPSHUTDOWN" Value="TRUE" />
        <Property Name="SharedComputerLicensing" Value="1" />
        <Property Name="AUTOACTIVATE" Value="1" />
         </Configuration>

    Or do they have to be unique separate scripts?

    Thursday, September 27, 2018 10:44 AM
  • I have been banging on this problem for a few hours using an apparently newer version of ODT SETUP.EXE that no long supports /UNINSTALL and requires /CONFIGURATION rather than /CONFIG.

    I wrote up the solution here:

    https://www.urtech.ca/2019/03/solved-command-line-to-uninstall-office365-pro-plus/

    I hope this helps as it was making me nuts.


    Ian Matthews www.urtech.ca www.commodore.ca

    • Proposed as answer by rhema43 Wednesday, March 13, 2019 2:39 AM
    Monday, March 11, 2019 4:32 PM
  • DUDE! you freakin rock ian matthews!!!!!!!!!!!!!!!!!!!!! 

    your script is exactly what me and my organization was needing. It frustrated the heck out of me and I have been at this for weeks. 

    I have successfully removed office 365 business premium and office 365 pro plus using your script. Just had  to modify it a bit but boy am i glad you posted your fix

    THANK YOU!!!!!!!!!!!!!!!!!!!!!!


    ~qhdevon43

    Wednesday, March 13, 2019 2:38 AM
  • thanks for your help

    Jesús Ángel Señorán López. Administrador de sistemas y seguridad.

    Tuesday, April 2, 2019 7:38 AM
  • Seems to work only for C2R products, not MSI.

    MCSE Mobility 2018. Expert on SCCM, Windows 10 and MBAM.

    Wednesday, April 10, 2019 10:10 PM