Skip to main content
Question

Script to Install & Update Zoom

  • September 28, 2018
  • 142 replies
  • 963 views

Show first post

142 replies

Forum|alt.badge.img+1

I have copied the latest script (above) but I still get Policy Error Code 2100 when running "jamf policy -event zoom -verbose"

ok, script now running fine. I found this support thread regarding a '/' in the policy title.
https://www.jamf.com/jamf-nation/discussions/20342/script-runs-fine-on-machine-fails-as-a-policy

Thank again for your help :)


Forum|alt.badge.img+4
  • New Contributor
  • April 8, 2020

What can I do if we do not use a domain and are using the free upgrade due to COVID-19? This script forces a domain?


beeboo
Forum|alt.badge.img+7
  • Contributor
  • April 9, 2020

you can remove the line item for domain

<key>ZAutoSSOLogin</key> <true/> <key>ZSSOHost</key> <string>$ssohost</string>"

can be removed to be suited to your needs


atomczynski11
Forum|alt.badge.img+18

The script from 4-5-2020 runs and completes for me.

I do have one problem. the .plist file is not being updated and I'm unable to locate it.
Ideas?


Forum|alt.badge.img+13

@atomczynski its located at /Library/Preferences/us.zoom.config.plist.


Forum|alt.badge.img+6
  • Contributor
  • April 14, 2020

Here's what we do for ours. It's a multi pronged approach that several pieces need to be in place before updated.

  1. We have an extension attribute that runs on the endpoint and compares what the current shipping version of Zoom vs what the user has installed. If it's out of date it gets the attribute 'Old'. If it's the current version, it is 'Latest'.

  2. We have a smart group that is scoped to that extension attribute and only add 'Old' devices.

  3. Once a day a policy runs against machines that are in the 'Old' smart group. The script within the policy pulls the latest IT installer version from Zoom and installs it to their computer.

This is the installer script for the policy.

#!/bin/bash
# This script runs within a policy is scoped to devices listed as 'Old' in the Extension Attribute.
OSvers_URL=$( sw_vers -productVersion | sed 's/[.]/_/g' )

userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X ${OSvers_URL}) AppleWebKit/535.6.2 (KHTML, like Gecko) Version/5.2 Safari/535.6.2"

# Get the latest version of Reader available from Zoom page.
latestver=`/usr/bin/curl -s -A "$userAgent" https://zoom.us/download | grep 'ZoomInstallerIT.pkg' | awk -F'/' '{print $3}'`

echo "Installing version ${latestver}";

url="https://zoom.us/client/${latestver}/ZoomInstallerIT.pkg"

# Construct the plist file for preferences
echo "<?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <dict>
      <key>nogoogle</key>
      <true/>
      <key>nofacebook</key>
      <true/>
      <key>disableloginwithemail</key>
      <true/>
      <key>LastLoginType</key>
      <true/>
      <key>ZAutoUpdate</key>
      <true/>
      <key>ZAutoJoinVoip</key>
      <true/>
      <key>ZAutoSSOLogin</key>
      <true/>
      <key>ZSSOHost</key>
      <string>pretendco.zoom.us</string>
      <key>ZRemoteControlAllApp</key>
      <true/>
      </dict>
      </plist>" >> /var/tmp/us.zoom.config.plist;

/usr/bin/curl -L -o /var/tmp/ZoomInstallerIT.pkg ${url};

/usr/sbin/installer -pkg /var/tmp/ZoomInstallerIT.pkg -target /;

This is the extension attribute to label the device as 'Old' or 'Latest'

#!/bin/bash
# This script is used as an extension attribute and compares
# the IT installer version on the Zoom site vs what the user is running
if [ ! -d "/Applications/zoom.us.app" ]; then
  echo "<result>Not Installed</result>"
  exit 0

else

# Determine current OS version to pass to user string
  OSvers_URL=$( sw_vers -productVersion | sed 's/[.]/_/g' )
# Create useragent to pass into curl command
  userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X ${OSvers_URL}) AppleWebKit/535.6.2 (KHTML, like Gecko) Version/5.2 Safari/535.6.2"
# Pull current available version of Zoom from their site
  latestver=`/usr/bin/curl -s -A "$userAgent" https://zoom.us/download | grep 'ZoomInstallerIT.pkg' | awk -F'/' '{print $3}'`
# Get current version installed on computer
  installedVersion=$( defaults read /Applications/zoom.us.app/Contents/Info.plist CFBundleVersion )
# Compare zoom version vs installed version, print result

if [ "$latestver" == "$installedVersion" ]; then
  echo "<result>Latest</result>"
  exit 0
else
  echo "<result>Old</result>"
  exit 0
fi
fi

Forum|alt.badge.img+4
  • Contributor
  • April 14, 2020

This is great, thanks for sharing, @dmarcnw ! Has anyone created something similar or recommend a way to modify this EA to show the current installed version? This would be more for reporting than scoping.


Forum|alt.badge.img+4
  • New Contributor
  • April 14, 2020

Hey @JMenacker

I modified the EA by @dmarcnw so it will display the version of Zoom installed for you:

#!/bin/bash
# This script is used as an extension attribute and displays
# the current version of Zoom installed on a Mac
if [ ! -d "/Applications/zoom.us.app" ]; then
  echo "<result>Not Installed</result>"
  exit 0

else

# Get current version installed on Mac
  installedVersion=$( defaults read /Applications/zoom.us.app/Contents/Info.plist CFBundleVersion )

# Display current version installed on Mac
  echo "Current Zoom version is: $installedVersion"
  exit 0
fi

Forum|alt.badge.img+3
  • New Contributor
  • April 16, 2020

Hi, thank you and this is brilliant...

However, i wish to simply push the us.zoom.config.plist to the /Library/Preferences/ directory, for existing Zoom installations. Doing this does NOT change the Zoom client config. Should this be possible, or does it REQUIRE a full reinstall with the plist file alongside with the pkg?


talkingmoose
Forum|alt.badge.img+36
  • Community Manager
  • April 16, 2020

@ajhstn, you may find this useful. It’s a manifest to help you set Zoom settings using a configuration profile.

https://www.jamf.com/jamf-nation/discussions/35399/zoom-update-is-requiring-admin-credentials-in-self-service#responseChild200596


Forum|alt.badge.img+3
  • New Contributor
  • April 17, 2020

I want to answer my own question i posted here, it might be useful to someone.

However, i wish to simply push the us.zoom.config.plist to the /Library/Preferences/ directory, for existing Zoom installations. Doing this does NOT change the Zoom client config. Should this be possible, or does it REQUIRE a full reinstall with the plist file alongside with the pkg?

The answer is;
-- https://zoom.us/client/latest/Zoom.pkg does not recognise /Library/Managed Preferences/ or /Library/Preferences
-- https://zoom.us/client/latest/ZoomInstallerIT.pkg does recognise both paths above.

So if you want to just push a config to an existing Zoom client, you must make sure that Zoom was installed using the ZoomInstallerIT.pkg package, not Zoom.pkg.


Forum|alt.badge.img+2
  • New Contributor
  • April 17, 2020

@ajhstn, a zillion thanks for this tip. I literally spent most than half the day trying to figure out why my plists would not stick. The funny thing was that some things like auto sso login were loading and some were not and so I was convinced that I entering the plist wrong. I also found out the Zoom client was also storing some settings in ~/Library/Application Support/zoom.us/data/zoomus.db -- really fustrating!


CommandShiftK
Forum|alt.badge.img+4

@talkingmoose that manifest worked really well for me. thank you!


talkingmoose
Forum|alt.badge.img+36
  • Community Manager
  • April 23, 2020

[~mmark - childrensnational], thanks for feedback! Glad to hear it's working.


atomczynski11
Forum|alt.badge.img+18

Today I see some failures of install.

Script result: Latest Version is: 5.0.23508.0430
Current installed version is: 4.6.20561.0413
Latest version of the URL is: https://zoom.us/client/5.0.23508.0430/ZoomInstallerIT.pkg
installer: Package name is Zoom
installer: Upgrading at base path /
installer: The upgrade was successful.
Version on Mac is 4.6.20561.0413
Zoom not updated - Installation error

Forum|alt.badge.img+5
  • Contributor
  • May 1, 2020

I am also getting that but suspect it may be due to Zoom running at the time it's trying to upgrade? I have mine set to run at login so it shouldn't be that reason, but there's no consistency to the Macs that fail (OS versions).


Forum|alt.badge.img+5
  • Contributor
  • May 1, 2020

I see that error too and you are correct that this is because Zoom is running. I will try some more logic with buttons but for now I added to the jamf helper notification in the Script to notify that the end user will need to quit zoom and reopen for the update to take effect.


jyergatian
Forum|alt.badge.img+9
  • Contributor
  • May 1, 2020

Out of curiosity, is including the .plist with the .pkg better practice compared to utilizing a configuration profile and the Custom Settings payload?


Forum|alt.badge.img+6
  • Contributor
  • May 15, 2020

Is anyone having problems with this line? I am not returning any result for this...

EDIT: Nvm, I forgot to include the variables inside the command. Disregard.

#!/bin/sh
latestver=`/usr/bin/curl -s -A "$userAgent" https://zoom.us/download | grep 'ZoomInstallerIT.pkg' | awk -F'/' '{print $3}'`
echo "Latest Version is: $latestver"

Forum|alt.badge.img+1
  • New Contributor
  • May 20, 2020

@ajhstn What method did you use or how did you push the us.zoom.config.plist to the /Library/Preferences/ directory? I'm not having any luck with Composer?


beeboo
Forum|alt.badge.img+7
  • Contributor
  • May 20, 2020

@stmpl10

https://www.jamf.com/jamf-nation/discussions/35399/zoom-update-is-requiring-admin-credentials-in-self-service#responseChild202203

answered you other thread, but you can just make the plist as you want then drop it into composer.


Forum|alt.badge.img+1

Do I actually have to have the *.pkg file in the local disk of the Computers in the Scope?


Forum|alt.badge.img+7
  • Valued Contributor
  • June 3, 2020

I would like to use the above script without the plist options. We don't use Zoom SSO or control how users connect. Can I just edit the plist section out of the script?


beeboo
Forum|alt.badge.img+7
  • Contributor
  • June 16, 2020

@erichughes yes ofc, just deploy the zoomIT pkg if thats all you desire.


Forum|alt.badge.img+6
  • Contributor
  • July 3, 2020

How do I modify the script to allow Google instead of an SSO?