none
Uninstall Specific Office Apps RRS feed

  • Question

  • I am preparing Office 2007 packages to deploy to a client of approx 1200 seats via SMS 2003.

    About 5% of the target machines have 2007 installed already. I am looking to uninstall Word, Excel, PPT and Outlook off these machines (I.E. not uninstall other apps such as Access, InfoPath, Publisher, Visio Viewer, etc...) and reinstall with the standard set of install bits.

    With the Office 2007 OCT I can uninstall individual components that are prior to Office 2007 but not at 2007. I have been looking to accomplish this by leveraging the setup.exe in the MSOCache directory and then creating a config.xml file to point at that names the target Office suite. In the config.xml there is an "Option State" setting that I thought would allow me to uninstall specific Office components but research and testing have not proven this out. It appears the Option State value is only for install and not uninstall.

    Question: What is the best approach for uninstalling individual Office 2007 components by leveraging scripting?

    Wednesday, June 2, 2010 2:12 PM

Answers

  • Hello Chrissthom2,

    When you are installing Office, setup can only uninstall previous versions of Office, not the version being installed. You are also correct that OptionState ID’s only work well for installing Office 2007.

    What SKU of Office 2007 is currently installed on 5% of your machines? Is it a mix of standalone apps or is it a suite? The reason I ask is you will need to target only those SKU’s you want removed. You will also need to target and remove the SKU you are trying to install if it is already installed on these machines.

    One way to do this with a script is to utilize the Office 2007 setup controllers /uninstall switch. You can only target one product at a time, but can run setup multiple times to remove everything. You will also need to create a config.xml file for each product you want to uninstall and set it to perform the uninstall silently.

    Here is an example of a config.xml file for silently uninstalling Office 2007 ProPlus:

    <Configuration Product="ProPlus">
    
    <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
    
    </Configuration>
    

    Save this in the same folder as setup.exe and call it SilentUninstallProPlus.xml . Then run the following command line:

    \\server\share\office_source\setup.exe /uninstall ProPlus /config \\server\share\office_source\SilentUninstallProPlus.xml

    You can repeat these steps for each Office 2007 product you need to remove, and then combine all of the commands into a .bat file and push it with SMS before pushing your Office 2007 setup package. Note that you need to make a XML customization file for each product you are uninstalling. All you need to change is the Product= line to match the product you are uninstalling.

    Here is an example .bat showing multiple product uninstalls:  

    start /wait \\server\share\office_source\setup.exe /uninstall ProPlus /config \\server\share\office_source\SilentUninstallProPlus.xml
    
    start /wait \\server\share\office_source\setup.exe /uninstall Enterprise /config \\server\share\office_source\SilentUninstallEnterprise.xml
    
    start /wait \\server\share\office_source\setup.exe /uninstall Word /config \\server\share\office_source\SilentUninstallWord.xml
    

     

     

    I’m also including a reference link to the Office 2007 Resource Kit explaining the /uninstall switch: http://technet.microsoft.com/en-us/library/cc178956(office.12).aspx

     


    Regards,
    Sean Francis
    Microsoft Online Community Support
    Office Deployment Support Blog: http://blogs.technet.com/odsupport
    Thursday, June 3, 2010 3:04 PM

All replies

  • Hello Chrissthom2,

    When you are installing Office, setup can only uninstall previous versions of Office, not the version being installed. You are also correct that OptionState ID’s only work well for installing Office 2007.

    What SKU of Office 2007 is currently installed on 5% of your machines? Is it a mix of standalone apps or is it a suite? The reason I ask is you will need to target only those SKU’s you want removed. You will also need to target and remove the SKU you are trying to install if it is already installed on these machines.

    One way to do this with a script is to utilize the Office 2007 setup controllers /uninstall switch. You can only target one product at a time, but can run setup multiple times to remove everything. You will also need to create a config.xml file for each product you want to uninstall and set it to perform the uninstall silently.

    Here is an example of a config.xml file for silently uninstalling Office 2007 ProPlus:

    <Configuration Product="ProPlus">
    
    <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
    
    </Configuration>
    

    Save this in the same folder as setup.exe and call it SilentUninstallProPlus.xml . Then run the following command line:

    \\server\share\office_source\setup.exe /uninstall ProPlus /config \\server\share\office_source\SilentUninstallProPlus.xml

    You can repeat these steps for each Office 2007 product you need to remove, and then combine all of the commands into a .bat file and push it with SMS before pushing your Office 2007 setup package. Note that you need to make a XML customization file for each product you are uninstalling. All you need to change is the Product= line to match the product you are uninstalling.

    Here is an example .bat showing multiple product uninstalls:  

    start /wait \\server\share\office_source\setup.exe /uninstall ProPlus /config \\server\share\office_source\SilentUninstallProPlus.xml
    
    start /wait \\server\share\office_source\setup.exe /uninstall Enterprise /config \\server\share\office_source\SilentUninstallEnterprise.xml
    
    start /wait \\server\share\office_source\setup.exe /uninstall Word /config \\server\share\office_source\SilentUninstallWord.xml
    

     

     

    I’m also including a reference link to the Office 2007 Resource Kit explaining the /uninstall switch: http://technet.microsoft.com/en-us/library/cc178956(office.12).aspx

     


    Regards,
    Sean Francis
    Microsoft Online Community Support
    Office Deployment Support Blog: http://blogs.technet.com/odsupport
    Thursday, June 3, 2010 3:04 PM
  • Thanks for getting back to me with the answer on this.

    It actually turned out that using the customized config.xml did work. Listing out the Option States and marking them in the following way worked:

    <OptionState Id="WORDFiles" State="absent" Children="local" 

    The problem with why it was not working when I posted the query is that I put a "/Uninstall ProPlus" instaead of /Modify ProPlus" arguement at the end of the command line. So the successful command line now looks like this:

    setup /config E:\OFFICE_WG\Uninstall.xml\WG_Standard_Uninstall.xml /modify ProPlus

    D'oh....It is always the little things.... :-)

    Thanks for your help.

    -Chris

    Friday, June 11, 2010 6:58 PM
  • Sorry for resurrecting an old thread.

    I read thru the thread numerous times, but it's still murky to me. I've got an install of Office Professional Plus 2010 including Outlook. I want to do a silent uninstall of Outlook but leave the rest alone.

    Do I need "Outlook" in the xml file?  Chrissthom2's message talks about /uninstall versus /modify.  Do I need to modify Office before uninstalling Outlook?
    • Edited by RX752 Tuesday, February 28, 2012 9:18 PM
    Tuesday, February 28, 2012 9:14 PM
  • Hi,

    you can either create a customisation MSP file using the OCT, and use this to set the feature state of Outlook to be "Not Installed", and deploy that to machines using "msiexec /p removeOutlook.MSP"

    or

    author a config.xml with the Outlook feature set to "absent", then, invoke "setup.exe /config:removeoutlookconfig.xml /modify ProPlus" .
    on an installed system you will likely find setup.exe present here:
    C:\Program Files\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\setup.exe

    Because you are changing an installed instance of Office, you are "modifying" that installed instance, by changing the feature state of Outlook from "local" (which means installed) to "absent"
    (Outlook is considered a feature, or sub-component, of Office ProPlus)
    http://technet.microsoft.com/en-us/library/cc982159.aspx


    Don


    • Edited by DonPick Wednesday, February 29, 2012 8:01 PM
    Wednesday, February 29, 2012 8:30 AM