Worklet to remove Zoom

Evaluation Code:

if(test-path -Path "%APPDATA%/Zoom"){Exit 1}

Remediation Code:

$process = Start-Process -File-Path "%APPDATA%\Zoom\Zoom\uninstall\Installer.exe" -ArgumentList "/uninstall" -PassThru
Exit $process.ExitCode

Hi @TechieOneKenobi

Thanks for this. I have been meaning to look into removing zoom for a while.

Im not sure why but I cannot resolve the %appdata% file path. I had to set a variable of the file path first to get it and then use that variable to remove zoom. Like bellow.

$appdata = Resolve-Path "C:\users\*\appdata\roaming\zoom\uninstall\Installer.exe"
Start-Process -FilePath $appdata -ArgumentList "/uninstall"

Also I’m pretty sure that you have a typo in there on “-File-Path”, shouldn’t it be -FilePath.

You are correct on the -FilePath, unfortunately I cannot edit it. As for not being able to resolve the &APPDATA% path, I’d check the environment variables.

this properly has to do with running in system context instead or user context. The variable is not available as system.

1 Like

There is a wrapper using scheduled tasks that I made (thanks to @rich for the original code) to workaround this problem:

We’re also looking at a potential future improvement to worklets where we let you specify System or currently logged in user for the code running.

2 Likes