is there Worklet to uninstall MS office from Windows??

i want to uninstall MS office 2016 using Automox.

I haven’t tried it out, but you could possibly use this general purpose uninstaller worklet: Worklet: Enforced Application Uninstall for Windows

It gives me this error.

powershell.exe : This command cannot be run due to the error: The system cannot find the file specified. At C:\ProgramData\amagent\execDir606954035\execcmd741377014.ps1:73 char:20 + … alledApps = & "$env:SystemRoot\sysnative\WindowsPowerShell\v1.0\power … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:slight_smile: [Start-Process], InvalidOperationException + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

Did you change the $appname variable? In the example worklet that’s set to Steam but you’ll need to change that to what shows in your add/remove programs for the version of office that you want to remove.

Yes I replaced It by " MS Office Standard 2016 " which is name of ms office in my system.

Is this a 64-bit device or 32-bit? If the latter, you can replace sysnative with system32 in the file path and that should do the trick.

it is 64 bit windows 10 version1909

It sounds like the variable to specify the path isn’t resolving for some reason. You could try hard coding that to:
to get rid of the file not found message.

Let me know if that works!

1 Like

no it is not working .This time it says only error ; no details

Let’s have you open a support ticket for this one so that we can troubleshoot further. If you click on the chat icon in the bottom right of your console then that will let you start a support conversation.

Hi Taranbir,
When you go to the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Do you see Microsoft office 2016 or is it named something else?

1 Like


I believe you should replace the $appname with Office16, try that instead of MS Office Standard 2016

Yes I tried it .now it gives this error.
At C:\ProgramData\amagent\execDir838993477\execcmd669544672.ps1:39 char:67 + … ook at a machine with the application installed unless you’re sure th … + ~~ Unexpected token ‘re’ in expression or statement. At C:\ProgramData\amagent\execDir838993477\execcmd669544672.ps1:70 char:1 + } + ~ Missing closing ‘)’ in subexpression. + CategoryInfo : ParserError: (:slight_smile: [], ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken

Have you tried running this script outside in powershell to see what error you get? I would always suggest running things manually before putting it in a worklet where you can. When I run something similar (dont have office 2016) the Microsoft installer prompt comes up saying I need the right parms to remove the software in the script for what I was uninstalling. I was trying to remove my old Azure Emulator so I would believe it would be similar to what you would need to do as well.