Silently removing WebEx Productivity Tools

thefishyfew
New Contributor II

I'm looking for a good method to remove WebEx Productivity tools, preferably silently. So far, all I am finding is Cisco's page to have the user run the uninstaller.

https://help.webex.com/en-us/WBX32304/How-Do-I-Uninstall-Webex-Productivity-Tools

The reason for this removal is those tools will be blocked in May 2021 for macs: https://support.microsoft.com/en-us/office/outlook-for-mac-%e2%80%93-planned-update-for-injection-based-plugins-dc6f9490-da7d-4d35-8793-835636b954d5?ui=en-US&rs=en-US&ad=US

12 REPLIES 12

damienbarrett
Valued Contributor

I don't have any experience with installing or uninstalling WebEx, but for other applications that I've wanted to silently uninstall on my fleet, I've successfully been able to build (or rebuild) the installer package/dmg, make sure that I've indexed the package/dmg in Jamf Admin, which then allows Jamf Pro to silently uninstall the software via a policy. Obviously, you'd need to test this and if your software has already been deployed/installed (which is sounds like), this process may not work...so YMMV. But it's the route I'd go -- basically use Jamf Admin to index the WebEx installer which then enables the uninstall option in Jamf Pro.

One thing that's not clear -- I'm almost certain that this uninstaller functionality relies on a package receipt being installed on a system. But if WebEx was installed prior to all of this, then the package receipt won't be understood or parsed by the jamf binary that's doing the uninstall work. So you might have to jump through some hoops like: 1) index the WebEx installer to create the uninstall option (or, even repackage the WebEx installer using Composer) 2) re-install WebEx silently on all your client machines so that the package receipt exists 3) then use a jamf policy to execute the uninstall command.

Yeah, a lot of work and hoop-jumping, but it's a route I'd explore were I in your shoes. Google's not showing me any Mac tools for (natively) silently uninstalling WebEx (I suspect that it doesn't exist).

sdagley
Esteemed Contributor II

@thefishyfew If the Webex Productivity Tools are installed there should be a folder with that name in /Applications which contains an uninstaller. You can call that directly, say via an Excute Command line in a Files & Processes payload, with this: "/Applications/Webex Productivity Tools/Uninstall.app/Contents/MacOS/Uninstall"

@damienbarrett I can't speak for removing the Cisco WebEx Meetings app itself. Given how non-silent the install is I doubt the un-install would be any better. BTW, when you do try uninstalling it don't forget the remove the Library/Application Support/WebEx Folder from each user's home directory. It appears that every time a Cisco Webex app (Meetings, Meeting Center, Training) updates it leaves a copy in that folder.

damienbarrett
Valued Contributor

That's good to know that there's a silent uninstall option for Webex. I couldn't find any documentation for this when I was Googling (but perhaps my GoogleFu was just off).

Provided there's a silent uninstaller that can be triggered with a policy, it should be very simple then to also write a bash script that can delete any leftover files and settings, and even Apps themselves. Thanks.

darthmaverick
New Contributor III

It's not completely silent but I think it's good enough. Also I highly recommend indicating spaces very specifically when executing a command in Files and Processes.

/Applications/Webex Productivity Tools/Uninstall.app/Contents/MacOS/Uninstall

pbowden
Contributor III

@darthmaverick @damienbarrett I have a payload-free package for removing Webex Productivity Tools at https://office-reset.com/macadmins/ ....this invokes the native Uninstall routine, then cleans up the parts that are left behind.

emily
Valued Contributor III
Valued Contributor III

@pbowden you continue to be the 🐐. Thank you for that amazing resource!

iJake
Valued Contributor

I wrote this for our internal use but it was vetted by the Webex PT team so customers could use it as well. Does not handle closing Outlook so it is silent but a restart of Outlook is required to fully complete the removal.

#!/bin/sh

### Variables ###

pluginAgentPath="/Library/LaunchAgents/com.webex.pluginagent.plist"

### Arrays ###

wxptPathsArray=(
        '/Users/Shared/WebExPlugin'
        '/Applications/Webex Productivity Tools'
        '/Library/Application Support/Microsoft/WebExPlugin'
    '/Library/LaunchAgents/com.webex.pluginagent.plist'
        '/Library/ScriptingAdditions/WebexScriptAddition.osax'
        )

### Functions ###

# Determine logged in user
grabConsoleUserAndHome(){
  currentUser=$(stat -f %Su "/dev/console")
  homeFolder=$(dscl . read "/Users/$currentUser" NFSHomeDirectory | cut -d: -f 2 | sed 's/^ *//'| tr -d '
')
  case "$homeFolder" in
     * * )
           homeFolder=$(printf %q "$homeFolder")
          ;;
       *)
           ;;
esac
}

# See if LaunchAgent is running and unload if it is
bootoutWebexPluginAgent()
{
if [[ $(launchctl print gui/$(id -u "$currentUser")/com.webex.pluginagent | grep -c "state = running") -gt 0 ]]
    then
        echo "WxPT Plugin Agent is running. Stopping..."
        if [[ -e "$pluginAgentPath" ]]
          then
            launchctl bootout gui/$(id -u "$currentUser") "$pluginAgentPath"
        fi
    else
        echo "WxPT Plugin Agent is not running..."
fi
}

# Get PIDs of Webex Productivity Tools app and kill processes
killWebexProdToolsApp()
{
  pidsArray=($(ps aux | awk '/Webex Productivity Tools/ {print $2}'))
  for eachPID in ${pidsArray[@]}
    do
      kill $eachPID
    done
}

# Loop through wxptPathsArray array and determine if folder or file and delete appropriately
deleteFilesAndFolders()
{
  IFS=$'
'
  for eachPath in ${wxptPathsArray[@]}
    do
      if [[ -d "$eachPath" ]]
        then
          echo "$eachPath is a directory. Deleting..."
          rm -rf "$eachPath"
      elif [[ -f $eachPath ]]
        then
          echo "$eachPath is a file. Deleting..."
          rm -f "$eachPath"
      else
          echo "$eachPath is not valid..."
      fi
    done
    unset IFS
}

### Main ###

grabConsoleUserAndHome

bootoutWebexPluginAgent

killWebexProdToolsApp

deleteFilesAndFolders

exit 0

wmateo
Contributor

has anyone figured out the WebEx scheduler? I want to see about deploying this. I believe it's just O365 Tenant driven

iJake
Valued Contributor

@wmateo That is correct. Configured in your tenant

DF_Flex
New Contributor

@iJakeThank you for posting that shell script. I tried to use that script but it give this error :

Script result: /Library/Application Support/JAMF/tmp/Uninstall Webex Productivity Tools: line 25: syntax error near unexpected token `*'
/Library/Application Support/JAMF/tmp/Uninstall Webex Productivity Tools: line 25: ` * * )

 

Im not sure exactly whats wrong with that line, could you please assist?

AllegisEngineer
New Contributor

Same as above, we do get the same syntax error.

pbowden
Contributor III