Worklet needed to uninstall Office 2016, reboot, and install 365

  • 10 June 2022
  • 0 replies


Now that we’ve upgraded most of our Office 365 licences, I’m looking for a worklet which will uninstall Office 2016 overnight, reboot, then install Office 365.

I’m struggling to figure out how to do this though, so any help would be much appreciated.

I have a list of computers with Office 2016 installed, and I’ve found a VBS script, OffScrub_O16.vbs to do the removal, and I see there is already a worklet for installing 365 I think, but it’s how to piece them all together.

I’ve got as far as the below in my thinking. It’d be good if the worklet checks if any Office 2016 apps are installed (although not critical as I’ve pulled a list of computers from our inventory software), before calling the remediation code, which might contain this:

taskkill /f /im lync.exe
taskkill /f /im winword.exe
taskkill /f /im excel.exe
taskkill /f /im msaccess.exe
taskkill /f /im mstore.exe
taskkill /f /im infopath.exe
taskkill /f /im setlang.exe
taskkill /f /im msouc.exe
taskkill /f /im ois.exe
taskkill /f /im onenote.exe
taskkill /f /im outlook.exe
taskkill /f /im powerpnt.exe
taskkill /f /im mspub.exe
taskkill /f /im groove.exe
taskkill /f /im visio.exe
taskkill /f /im winproj.exe
taskkill /f /im graph.exe
taskkill /f /im teams.exe
cscript //NoLogo \\\SysVol\\scripts\Office\OffScrub_O16msi.vbs ALL /Quiet /NoCancel /Force /OSE
Restart-Computer -Wait

After the above I assume I’d then call the install 365 worklet somehow, but I’m kinda stuck!

0 replies

Be the first to reply!