Scripting Question

Uninstall Office 2010, then Install Office 2016

03/12/2018 3039 views

I'm really having troubles using your hardware to uninstall office 2010 and install office 2016.

Can you please show me how to run a script that I can monitor the success rate for machines that uninstalls office 2010.  Then I want to run a modified setup.exe with an attached .msp file from the kbox to each machine.  Please?

Answer Summary:
0 Comments   [ + ] Show comments


Answer Chosen by the Author

Office 2010 uninstall, some good hints: http://www.itninja.com/question/uninstall-office-2010-professional-plus

then, create a smart label for all devices without office 2010 and without office 2016
target your office 2016 installation to this label
Answered 03/13/2018 by: n1md4
Blue Belt

Community Chosen Answer

Office 2016 install should but does not remove old version has it suppose to.   Having said that, I worked at this most issue last year.  This is what I worked out, I wanted this to be uninstall and then install.  Not two passes.
A Batch file that looks like this: 
"C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\setup.exe" /uninstall PROPLUS /config "C:\ProgramData\Quest\KACE\downloads\37079\SilentUninstall.xml" /dll OSETUP.DLL
setup.exe /adminfile InstallOffice2016.MSP

This first line uninstall Office 2010 and the second install Office 2016,  All in one package.  Please note the manually assigned path for the XML file. You will have run the install once to find the download folder.  (use a commented out batch file to start, don't include the Office 2016 install, unless you want to wait for a 1.6gb office install to download).

and a XML file (for the Silent uninstall of Office 2010): 

<Configuration Product="ProPlus">
 <Display Level="basic" CompletionNotice="no" SuppressModal="yes" NoCancel="yes" AcceptEula="yes" />
 <Setting Id="SETUP_REBOOT" Value="NEVER" />

This is just how I did it and I go with what works. 

Answered 03/20/2018 by: boats2000
Senior Yellow Belt

All Answers

This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
I would recommend something along these lines, as it can reliably remover *any* previous office version. I have had problems in the past (for example with Outlook) if I did not explicitly remove any previous versions.

Answered 03/13/2018 by: Pressanykey
Red Belt



I'm unsure if you still require assistance in removing Office2010 Standard and deploying Office 2016 via KACE. If so I've managed to find asolution within our environment.


Step 1 - Creating a network share to host the Office 2010uninstall and Office 2016 Installation files.

1. As our environment isn't massive, we chose to create anew share off our distribution NAS and granted users read and write access it.For larger environments it might be wise to use a DFS. In this example I’llrefer to the share as,  “\\NAS\OFFICE365”

2. Within the share I copied the contents of "C:\ProgramFiles (x86)\Common Files\Microsoft Shared\OFFICE14\Office SetupController" from a working Office 2010 computer to a folder called “Office201032BIT”on \\NAS\OFFICE365


3. Create a XML file using notepad with the following config,note this is for Office 2010 standard. For Office 2010 Pro change “standard”for “ProPlus”:




<DisplayLevel="none" CompletionNotice="no"SuppressModal="yes" AcceptEula="yes" />




4. Save the XML file to the root of the share with the name of SilientUninstallConfig.xml


5. Download the office Deployment tools and extract the contentsto the root if \\NAS\OFFICE365:


Deployment tool link: https://docs.microsoft.com/en-us/deployoffice/overview-of-the-office-2016-deployment-tool


6. Edit the XML file so the SourcePath is pointing to your share,and adjust the Channel depending on your Office 365 agreement, ours has beenset to Monthly, please see my XML below:

<AddOfficeClientEdition="32" Channel="Monthly"SourcePath="\\NAS\OFFICE365">


      <Language ID="en-us" />



      <Language ID="en-us" />




7. Save the XML file with the name of Configuration.xml into the root of the share, \\NAS\OFFICE365


Step 2 – Setting up theKACE Script

  1. Create a manual device label. In this example I have create mineas: “D_Office_365_Install”

  2. Create a new Online KScript, in this example mine has beencalled: “SC_Office_365_Deployment”

  3. Tick the “Enable” box

  4. Enter in a desired description and notes.

  5. Under “Deploy” select the device label “D_Office_365_Install”

  6. Change the Operating Systems to “Microsoft Windows All” (thiswill enable the ability to use batch files when we come to setting up thetasks)

  7. Change the Windows Run As to use an account that has localadministrative rights to the machines. I’ve used the same account we use toinstall Microsoft Updates

  8. Set the desired Notification parameters. Mine has been set to,Notify users before run, Options = OK/Cancel, Timeout = 15mins, TimeoutAction=Cancel, Snooze Duration=5, Initial message = “Office 365 Installation -PLEASE SAVE AND CLOSE YOUR WORK FIRST - Click OK to proceed..”

  9. Change the Schedule to run every 15 mins (or however adjust tomeet your requirements)


Step 3 –Creating Tasks

Task 1

  1. Set attempts to 1

  2. Change the “On Failure” to Continue

  3. Change Verify to: “Verify a directory exists” and set the pathto: “C:\program files (x86)\Microsoft Office\Office14”

  4. Change on Success to run a batch file. Set the Script Name to: “Office2010 Removal” and enter the following into the batch file field:

\\NAS\Office365\O201032BIT\Setup.exe/uninstall standard /config \\NAS\Office365\SilientUninstallConfig.xml


Tick “Wait for completion” then clickSave Changes


  1. Change Remediation to Log message, Type = Status, Message = “Office2010 does exist” then click Save Changes

  2. Change “On Remediation Success” to “Log message”, Type = Status,Message = “Office 2010 removal script completed”. Click Save Changes.

  3. Change On Remediation Failure to “Log message”, Type = Status,message = “Office 2010 removal script failed” then click Save Changes


Task 2


  1. Set attempts to 1

  2. Change the “On Failure” to break

  3. Change Verify to “Verify that the directory exists” and set thepath to: “C:\program files (x86)\Microsoft Office\Office16”, then click savechanges

  4. Change “On Success” to “Log Message”, type status, message “Office365  is already installed”, then clickSave Changes

  5. Change “Remediation” to Run a batch file, set the script name to“Install Office 365”, enter the following into the bath file field:


\\NAS\Office365\setup.exe/configure \\NAS\Office365\configuration.xml


  1. Tick the “Wait for completion box and click save changes

  2. Change “On Remediation Success” to “Log message”, type  = status, Message  = “Office 365 Installation was successful”,click save changes

  3. Change “On Remediation Failure” to “Log message”, Type = status,Message = “Office 365 Installation failed”. Click save changes

  4. Click Save at the bottom of the screen to save the script.


To test the above, apply the D_Office_365_Install label to atest machine running Office 2010 Standard. Force Inventory and wait for theKACE prompt to appear. Click OK to start the script, this will uninstall Office2010 Standard, then reboot once finished.


Log back into the machine and wait for the KACE prompt again.Click ok and let the script run again, this will then install Office 2016.


Remove the user from the label.


If the script runs again it will just cancel itself off, sothere is no harm if you forget to remove the device from the label. The enduser will get prompted to run the script again, which will no doubt prompt acall to your service desk. As the script will just cancel itself as it willdetect Office 2016 is installed you won’t need to worry.

Answered 07/24/2018 by: darthak
White Belt

This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ