Use bat file to uninstall Office for Windows

Channel:
Subscribers:
15,200
Published on ● Video Link: https://www.youtube.com/watch?v=8xM1kiU0shQ



Duration: 3:59
13 views
1


Here's how to Use bat file (BETA Ver.) to uninstall Office for Windows.

Codes:

@echo off
REM Stop all Office applications before proceeding
taskkill /f /im WINWORD.EXE
taskkill /f /im EXCEL.EXE
taskkill /f /im POWERPNT.EXE
taskkill /f /im OUTLOOK.EXE

REM Uninstall Office 365
"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe" /uninstall

REM Uninstall Office 2019
"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe" /uninstall "AllProducts"

REM Uninstall Office 2016
"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe" /uninstall "ProPlusRetail" /dll OSETUP.DLL

REM Remove Office registry keys
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office /f
reg delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office /f
reg delete HKEY_CLASSES_ROOT\Installer\Products\00002109000000000000000000F01FEC /f

REM Remove Office program files
rd /s /q "C:\Program Files\Microsoft Office"
rd /s /q "C:\Program Files (x86)\Microsoft Office"
rd /s /q "C:\Program Files\Common Files\Microsoft Shared\ClickToRun"
rd /s /q "C:\Program Files (x86)\Common Files\Microsoft Shared\ClickToRun"

echo "Microsoft Office has been uninstalled successfully."
pause

And to re-download or reinstall yr Office, go to https://support.microsoft.com/en-us/office/download-and-install-or-reinstall-microsoft-365-or-office-2021-on-a-pc-or-mac-4414eaaf-0478-48be-9c42-23adc4716658.

Learn more@ https://www.youtube.com/c/ITGuides/search?query=Office.