- Prepare the uninstall command for Office 2016:
You can use the
setup.exe
that was used for the original installation, or you can use a generic uninstall command. The command to uninstall Microsoft Office 2016 via the command line is as follows:"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe" /update
- Create the script:
You can use PowerShell - for example:
# PowerShell script to uninstall Office 2016 $OfficeC2RClient = "C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe" # Check if the OfficeC2RClient exists if (Test-Path $OfficeC2RClient) { # Uninstall Office 2016 Start-Process -FilePath $OfficeC2RClient -ArgumentList "uninstall", "displaylevel=false", "forceappshutdown=true" -Wait Write-Host "Office 2016 has been uninstalled." } else { Write-Host "Office 2016 is not installed or the path is incorrect." }
- Deploy the script via MECM:
- Step 1: Create a Package in MECM that contains the script (either PowerShell or batch file).
- Step 2: Create a Program within the package to run the script (use the appropriate script file).
- Step 3: Deploy the package to the target collection.
- Step 4: Monitor the deployment status to ensure that Office 2016 is successfully uninstalled on the target machines.
The path C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe
may vary based on where Office 2016 was installed or if the user has a 32-bit or 64-bit version of Office.
If Office was installed via the Microsoft Office Deployment Tool (ODT) or other methods, the uninstallation process may vary, and you'll need the specific uninstall command that matches how it was originally installed.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin