Worklet: Enforced Application Uninstall for Windows

I think I figured out what’s going on here. Most of our users have Skype for Business installed through the Office Installation, in which case it’s not in Add/Remove programs, so there’s nothing we can really do without uninstalling office
and getting a customer Office install from MS. So, we can just forget this whole thing.

We are still very interested in checking for, installing and updating Microsoft Teams. Teams does seem to be a deperate component that appears in Add/remove programs. Can you check for an update on how that’s coming with your Engineer?


Are you using the reply by email feature? Unfortunately that doesn’t work for image uploads, so you’ll need to go to and post manually if you’re wanting to share a screenshot.


This does not show up in Add/Remove programs when it’s installed along with Office 365, which is the case for most of our users, but it is the version we would like to remove.

Looks like you nailed the problem. Just found this on the microsoft site.

Step 2: Remove Skype for Business from your computer

IMPORTANT : If you are using Office 365Skype for Business , you can’t delete it from your computer without also uninstalling the rest of the Office suite. This is because it’s integrated with the other Office apps. The following instructions are for customers who have standalone versions of Skype for Business.

1 Like

I checked on Teams. It still in active engineering so they are still working on it. A couple of tests have gone well for Mac’s but the windows 10 devices are causing some problems. If you would like to put in a ticket I can attach it to the escalation ticket and you’ll get updates on it’s progress on a weekly basis.
You can use intercom through the console or send an email to

Sent an email to support.

Thanks for this awesome worklet i was trying to use it to remove zoom so i changed the variables that stated Steam to Zoom but when run i see “COMMAND TIMED OUT.” in the activity log and and see that it fails on the device level.

Any pointers or directions i need to look at?

Do you happen to know if Zoom was running at the time the worklet attempted the uninstall?

I Don’t know to be honest, downside is zoom normally starts with the computer, force closing would be ideal.

You might need to force close Zoom by adding some code to the worklet. I know that our Zoom patching support has to check both to see if Zoom is running and also whether you are in the middle of a meeting. If you are in a meeting then Automox won’t force close Zoom to do the update, since that would interrupt what the end user is doing. The other option would be to remove Zoom from the computer’s autostart section, reboot, then run the worklet as is. Let me know if you need help with writing some code to do any of the above and I can give it a shot.

if you can share to code that would be awesome, force closing would be sufficient for my purpose would be ideal if it would use the existing variable.

Cool - I’ll work on that this coming week and post back when I have something that I can get to work at uninstalling Zoom.

awesome have a great weekend!

1 Like

Hi there. I have never had any luck with this script actually and have just tried again with short name and long name ‘Meraki’ again with ‘Meraki Systems Manager Agent’.

In the activity log I get COMMAND TIMED OUT.

in the amagent log I get 2021/01/26 09:18:37 cmd_windows.go:135: runScript: Error in Wait exit status 1

I used copied and pasted the script at the top and used it exactly. Windows 10 2004. The Agent was originally installed using an MSI.

Any suggestions? Or has anyone else had this?


Hi Djvj,
That usually happens when Automox is not able to find the app you are trying to uninstall. There are a couple causes for this. Just to be sure have you confirmed the name in HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall?

also, is this installed by an MSI or a .exe?

The name is not in that registry location. The app is still viewable in add remove programs, and there is still the meraki agent listed in running services.msc.

It was installed using MSI.

I haven’t had the opportunity to try this, but I am going to make a guess. According to the following Meraki documentation, it is using this registry location rather than the standard placement: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Meraki

If this is true, it may be useful to build out a Worklet eval and remediation based on the info here…
Testing this out is a good idea, haha :slight_smile:

1 Like

Hi @rich,

Thank you for this script. I tried using as a worklet and try to uninstall OneDrive (Microsoft OneDrive) but in the report it flagged me this error (See below). Your feedback and advise will be much appreciated.

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