Skip to main content

I need help deploying zoom updates or allowing non-admins to update zoom because zoom is constantly updating. Any suggestions?

They aren't on the latest version. They are on 5.4.7. It is maybe possible they were updated due to the upgrade option in plist. But not 100% sure. I don't know why it isn't working to get to 5.4.9. I don't know what folks are or are not doing, sadly.


@mojo21221

nice code it does work but I would like to ad <Key>PackageRecommend</key> into the mix so the user's can toggle it after the no facebook settings.but i am not quiet sure where to add the line in your code below

Compare the two versions, if they are different or Zoom is not present then download and install the new version.

if [ "${currentinstalledver}" != "${latestver}" ]; then

# 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> <string>1</string> <key>nofacebook</key> <string>1</string> <key>ZDisableVideo</key> <true/> <key>ZAutoJoinVoip</key> <true/> <key>ZDualMonitorOn</key> <true/>" > /tmp/${plistfile}

if [ "${ssohost}" != "" ]; then echo " <key>ZAutoSSOLogin</key> <true/> <key>ZSSOHost</key> <string>$ssohost</string>" >> /tmp/${plistfile} fi

echo "<key>ZAutoFullScreenWhenViewShare</key> <true/> <key>ZAutoFitWhenViewShare</key> <true/>" >> /tmp/${plistfile}

if [ "${hdvideo}" == "true" ]; then echo "<key>ZUse720PByDefault</key> <true/>" >> /tmp/${plistfile} else echo "<key>ZUse720PByDefault</key> <false/>" >> /tmp/${plistfile} fi

echo "<key>ZRemoteControlAllApp</key> <true/> </dict> </plist>" >> /tmp/${plistfile}"

Can you advise?

Edit: I figured it out. Was missing the <dict> (Sorry Very new to scripting)


use patch management- bundle this as a .sh... use composer to run the .sh from /private/tmp:

!/bin/bash

appname="zoom.us.app"
pkgfile="Zoom.pkg"
file="/Applications/zoom.us.app"

Download Link

url="https://zoom.us/client/latest/Zoom.pkg"

/bin/echo "--"
/bin/echo "date: Removing Existing Copy of $appname "
if [ -e "$file" ]
then echo "$file found; Removing now" /bin/rm -rf $file
fi
/bin/echo "date: Downloading latest version."
/usr/bin/curl -Lo /tmp/${pkgfile} ${url}
/bin/echo "date: Installing..."
/usr/bin/sudo /usr/sbin/installer -pkg /tmp/${pkgfile} -target /
latestver=$(defaults read /Applications/${appname}/Contents/Info.plist CFBundleShortVersionString )
/bin/echo "$(date): Latest Version is: $latestver"
/bin/echo "date: Deleting PKG file"
/bin/rm /tmp/"${pkgfile}"

exit 0


Hello,

Thank you for sharing the script! Is this just for the intel system? I ran the script on my own M1 chip MacBook and It's been installed successfully but it's just asking to update to the compatible version.

 


It seems like this script no longer works because it can no longer get the current version number, so the URL is incorrect. Does anyone have a fix for this?


It seems like this script no longer works because it can no longer get the current version number, so the URL is incorrect. Does anyone have a fix for this?


Yes, same issue. The script does not get the latest version hosted by https://zoom.us/download 

I can't figure out the problem. Any idea, please ?


Yes, same issue. The script does not get the latest version hosted by https://zoom.us/download 

I can't figure out the problem. Any idea, please ?


For now, I changed the script to assign the latest version number to the $latestver variable and commented out the commands that get the latest version number. Now I want to learn how to utilize the CURL command.

latestver="5.11.10.10279"

It's quicker than uploading a new package. I just modify the script when a new version comes out. I also put Zoom in Patch Policies so I can check for the latest version.

I don't suppose there's a way to grab that data from the patch policy and apply it to the script?


For now, I changed the script to assign the latest version number to the $latestver variable and commented out the commands that get the latest version number. Now I want to learn how to utilize the CURL command.

latestver="5.11.10.10279"

It's quicker than uploading a new package. I just modify the script when a new version comes out. I also put Zoom in Patch Policies so I can check for the latest version.

I don't suppose there's a way to grab that data from the patch policy and apply it to the script?


IMHO, this is the best option for the moment (even if you need to update the script frequently). Thank you

Hopefully, someone will find out a solution soon


It seems like this script no longer works because it can no longer get the current version number, so the URL is incorrect. Does anyone have a fix for this?


Same issue here.  From terminal:
Latest Version is: 
Current installed version is: 5.11.6.9890
/Users/llitz/Desktop/Zoom _Auto_Install_and_Updates.sh: line 65: [: =: unary operator expected
Latest version of the URL is: https://zoom.us/client//ZoomInstallerIT.pkg
installer: Error - the package path specified was invalid: '/tmp/ZoomInstallerIT.pkg'.


A solution has been found on Slack.


 

Credit to Lee R and Matt Conrad on Slack.

#!/bin/sh ##################################################################################################### # # ABOUT THIS PROGRAM # # NAME # ZoomInstall.sh -- Installs or updates Zoom # # SYNOPSIS # sudo ZoomInstall.sh # #################################################################################################### # # HISTORY # # Version: 1.1 # # 1.1 - Shannon Johnson, 27.9.2019 # Updated for new zoom numbering scheme # Fixed the repeated plist modifications # # 1.0 - Shannon Johnson, 28.9.2018 # (Adapted from the FirefoxInstall.sh script by Joe Farage, 18.03.2015) # #################################################################################################### # Script to download and install Zoom. # Only works on Intel systems. # # Set preferences hdvideo="true" ssodefault="true" ssohost="lnu-se.zoom.us" # rm /Library/Preferences/us.zoom.config.plist # choose language (en-US, fr, de) lang="" # CHECK TO SEE IF A VALUE WAS PASSED IN PARAMETER 1 AND, IF SO, ASSIGN TO "lang" if [ "$4" != "" ] && [ "$lang" == "" ]; then lang=$4 else lang="en-US" fi pkgfile="ZoomInstallerIT.pkg" plistfile="us.zoom.config.plist" logfile="/Library/Logs/ZoomInstallScript.log" # Are we running on Intel? if [ '`/usr/bin/uname -p`'="i386" -o '`/usr/bin/uname -p`'="x86_64" ]; then ## Get OS version and adjust for use with the URL string 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}'` ulatestver=`/usr/bin/curl -s -A "$userAgent" https://support.zoom.us/hc/en-us/articles/201361963-Release-notes-for-macOS | grep 'version 5.' | head -1 | sed 's/^.*version /version /' | tr -d ' ' | sed -r 's/[(]+/./g' | cut -f1 -d")" | sed 's/version//g'` echo "$latestver" echo "$ulatestver" echo "Installing version ${latestver}"; url="https://zoom.us/client/${ulatestver}/ZoomInstallerIT.pkg" /usr/bin/curl -L -o /var/tmp/ZoomInstallerIT.pkg ${url}; res=$? echo "$res" if test "$res" != "0"; then echo "the curl command failed with: $res" exit 1 else /usr/sbin/installer -pkg /var/tmp/ZoomInstallerIT.pkg -target /; exit 0 fi # Get the version number of the currently-installed Zoom, if any. if [ -e "/Applications/zoom.us.app" ]; then currentinstalledver=$(/usr/bin/defaults read /Applications/zoom.us.app/Contents/Info CFBundleVersion) echo "Current installed version is: $currentinstalledver" if [ ${latestver} = ${currentinstalledver} ]; then echo "Zoom is current. Exiting" exit 0 fi else currentinstalledver="none" echo "Zoom is not installed" fi url="https://zoom.us/client/${latestver}/ZoomInstallerIT.pkg" #url="https://zoom.us/client/latest/ZoomInstallerIT.pkg" echo "Latest version of the URL is: $url" echo "`date`: Download URL: $url" >> ${logfile} # Compare the two versions, if they are different or Zoom is not present then download and install the new version. if [ "${currentinstalledver}" != "${latestver}" ]; then # 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>enableembedbrowserforsso</key> <string>false</string> <key>nogoogle</key> <string>1</string> <key>nofacebook</key> <string>1</string> <key>DisableLoginWithEmail</key> <string>1</string> <key>SetUpdatingChannel</key> <string>1</string> <key>ZDisableVideo</key> <false/> <key>ZAutoJoinVoip</key> <true/>" > /tmp/${plistfile} if [ "${ssohost}" != "" ]; then echo " <key>ZAutoSSOLogin</key> <true/> <key>ZSSOHost</key> <string>$ssohost</string>" >> /tmp/${plistfile} fi echo "<key>ZAutoFullScreenWhenViewShare</key> <false/> <key>ZAutoFitWhenViewShare</key> <true/>" >> /tmp/${plistfile} if [ "${hdvideo}" == "true" ]; then echo "<key>ZUse720PByDefault</key> <true/>" >> /tmp/${plistfile} else echo "<key>ZUse720PByDefault</key> <false/>" >> /tmp/${plistfile} fi echo "<key>ZRemoteControlAllApp</key> <true/> </dict> </plist>" >> /tmp/${plistfile} # Download and install new version /bin/echo "`date`: Current Zoom version: ${currentinstalledver}" >> ${logfile} /bin/echo "`date`: Available Zoom version: ${latestver}" >> ${logfile} /bin/echo "`date`: Downloading newer version." >> ${logfile} /usr/bin/curl -sLo /tmp/${pkgfile} ${url} /bin/echo "`date`: Installing PKG..." >> ${logfile} /usr/sbin/installer -allowUntrusted -pkg /tmp/${pkgfile} -target / /bin/sleep 20 /bin/echo "`date`: Deleting downloaded PKG." >> ${logfile} /bin/rm /tmp/${pkgfile} #double check to see if the new version got updated newlyinstalledver=$(/usr/bin/defaults read /Applications/zoom.us.app/Contents/Info CFBundleVersion) echo "Version on Mac is ${newlyinstalledver}" if [ "${latestver}" = "${newlyinstalledver}" ]; then /bin/echo "`date`: SUCCESS: Zoom has been updated to version ${newlyinstalledver}" >> ${logfile} echo "Zoom updated successfully" # /Library/Application\\ Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType hud -title "Zoom Installed" -description "Zoom has been updated." & else /bin/echo "`date`: ERROR: Zoom update unsuccessful, version remains at ${currentinstalledver}." >> ${logfile} /bin/echo "--" >> ${logfile} echo "Zoom not updated - Installation error" exit 1 fi # If Zoom is up to date already, just log it and exit. else /bin/echo "`date`: Zoom is already up to date, running ${currentinstalledver}." >> ${logfile} /bin/echo "--" >> ${logfile} fi else /bin/echo "`date`: ERROR: This script is for Intel Macs only." >> ${logfile} fi exit 0

 


 

Credit to Lee R and Matt Conrad on Slack.

#!/bin/sh ##################################################################################################### # # ABOUT THIS PROGRAM # # NAME # ZoomInstall.sh -- Installs or updates Zoom # # SYNOPSIS # sudo ZoomInstall.sh # #################################################################################################### # # HISTORY # # Version: 1.1 # # 1.1 - Shannon Johnson, 27.9.2019 # Updated for new zoom numbering scheme # Fixed the repeated plist modifications # # 1.0 - Shannon Johnson, 28.9.2018 # (Adapted from the FirefoxInstall.sh script by Joe Farage, 18.03.2015) # #################################################################################################### # Script to download and install Zoom. # Only works on Intel systems. # # Set preferences hdvideo="true" ssodefault="true" ssohost="lnu-se.zoom.us" # rm /Library/Preferences/us.zoom.config.plist # choose language (en-US, fr, de) lang="" # CHECK TO SEE IF A VALUE WAS PASSED IN PARAMETER 1 AND, IF SO, ASSIGN TO "lang" if [ "$4" != "" ] && [ "$lang" == "" ]; then lang=$4 else lang="en-US" fi pkgfile="ZoomInstallerIT.pkg" plistfile="us.zoom.config.plist" logfile="/Library/Logs/ZoomInstallScript.log" # Are we running on Intel? if [ '`/usr/bin/uname -p`'="i386" -o '`/usr/bin/uname -p`'="x86_64" ]; then ## Get OS version and adjust for use with the URL string 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}'` ulatestver=`/usr/bin/curl -s -A "$userAgent" https://support.zoom.us/hc/en-us/articles/201361963-Release-notes-for-macOS | grep 'version 5.' | head -1 | sed 's/^.*version /version /' | tr -d ' ' | sed -r 's/[(]+/./g' | cut -f1 -d")" | sed 's/version//g'` echo "$latestver" echo "$ulatestver" echo "Installing version ${latestver}"; url="https://zoom.us/client/${ulatestver}/ZoomInstallerIT.pkg" /usr/bin/curl -L -o /var/tmp/ZoomInstallerIT.pkg ${url}; res=$? echo "$res" if test "$res" != "0"; then echo "the curl command failed with: $res" exit 1 else /usr/sbin/installer -pkg /var/tmp/ZoomInstallerIT.pkg -target /; exit 0 fi # Get the version number of the currently-installed Zoom, if any. if [ -e "/Applications/zoom.us.app" ]; then currentinstalledver=$(/usr/bin/defaults read /Applications/zoom.us.app/Contents/Info CFBundleVersion) echo "Current installed version is: $currentinstalledver" if [ ${latestver} = ${currentinstalledver} ]; then echo "Zoom is current. Exiting" exit 0 fi else currentinstalledver="none" echo "Zoom is not installed" fi url="https://zoom.us/client/${latestver}/ZoomInstallerIT.pkg" #url="https://zoom.us/client/latest/ZoomInstallerIT.pkg" echo "Latest version of the URL is: $url" echo "`date`: Download URL: $url" >> ${logfile} # Compare the two versions, if they are different or Zoom is not present then download and install the new version. if [ "${currentinstalledver}" != "${latestver}" ]; then # 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>enableembedbrowserforsso</key> <string>false</string> <key>nogoogle</key> <string>1</string> <key>nofacebook</key> <string>1</string> <key>DisableLoginWithEmail</key> <string>1</string> <key>SetUpdatingChannel</key> <string>1</string> <key>ZDisableVideo</key> <false/> <key>ZAutoJoinVoip</key> <true/>" > /tmp/${plistfile} if [ "${ssohost}" != "" ]; then echo " <key>ZAutoSSOLogin</key> <true/> <key>ZSSOHost</key> <string>$ssohost</string>" >> /tmp/${plistfile} fi echo "<key>ZAutoFullScreenWhenViewShare</key> <false/> <key>ZAutoFitWhenViewShare</key> <true/>" >> /tmp/${plistfile} if [ "${hdvideo}" == "true" ]; then echo "<key>ZUse720PByDefault</key> <true/>" >> /tmp/${plistfile} else echo "<key>ZUse720PByDefault</key> <false/>" >> /tmp/${plistfile} fi echo "<key>ZRemoteControlAllApp</key> <true/> </dict> </plist>" >> /tmp/${plistfile} # Download and install new version /bin/echo "`date`: Current Zoom version: ${currentinstalledver}" >> ${logfile} /bin/echo "`date`: Available Zoom version: ${latestver}" >> ${logfile} /bin/echo "`date`: Downloading newer version." >> ${logfile} /usr/bin/curl -sLo /tmp/${pkgfile} ${url} /bin/echo "`date`: Installing PKG..." >> ${logfile} /usr/sbin/installer -allowUntrusted -pkg /tmp/${pkgfile} -target / /bin/sleep 20 /bin/echo "`date`: Deleting downloaded PKG." >> ${logfile} /bin/rm /tmp/${pkgfile} #double check to see if the new version got updated newlyinstalledver=$(/usr/bin/defaults read /Applications/zoom.us.app/Contents/Info CFBundleVersion) echo "Version on Mac is ${newlyinstalledver}" if [ "${latestver}" = "${newlyinstalledver}" ]; then /bin/echo "`date`: SUCCESS: Zoom has been updated to version ${newlyinstalledver}" >> ${logfile} echo "Zoom updated successfully" # /Library/Application\\ Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType hud -title "Zoom Installed" -description "Zoom has been updated." & else /bin/echo "`date`: ERROR: Zoom update unsuccessful, version remains at ${currentinstalledver}." >> ${logfile} /bin/echo "--" >> ${logfile} echo "Zoom not updated - Installation error" exit 1 fi # If Zoom is up to date already, just log it and exit. else /bin/echo "`date`: Zoom is already up to date, running ${currentinstalledver}." >> ${logfile} /bin/echo "--" >> ${logfile} fi else /bin/echo "`date`: ERROR: This script is for Intel Macs only." >> ${logfile} fi exit 0

 


Weird issue.

I get the this error when trying to edit the script in JSS web admin:

403 Access Denied Contact your IT Administrator for assistance.

I deleted the script and re-added from copy+paste and uploaded from Admin.

When I create a new script and add random text it saves and works, when I go to edit the script and copy+paste the script from this thread, it doesnt save and throws the error.

I guess I can edit offline and use Admin yet I'm concerned there's a larger issue...

Ideas?

Thanks.


Weird issue.

I get the this error when trying to edit the script in JSS web admin:

403 Access Denied Contact your IT Administrator for assistance.

I deleted the script and re-added from copy+paste and uploaded from Admin.

When I create a new script and add random text it saves and works, when I go to edit the script and copy+paste the script from this thread, it doesnt save and throws the error.

I guess I can edit offline and use Admin yet I'm concerned there's a larger issue...

Ideas?

Thanks.


Same thing here. I think it's something Jamf needs to fix. There's a discussion about it here:

https://community.jamf.com/t5/jamf-nation/saving-a-script-causing-error-403-access-denied/m-p/273286/emcs_t/S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufEw3VDhLTVVQWERHNEZTfDI3MzI4NnxTVUJTQ1JJUFRJT05TfGhL#M747


Same thing here. I think it's something Jamf needs to fix. There's a discussion about it here:

https://community.jamf.com/t5/jamf-nation/saving-a-script-causing-error-403-access-denied/m-p/273286/emcs_t/S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufEw3VDhLTVVQWERHNEZTfDI3MzI4NnxTVUJTQ1JJUFRJT05TfGhL#M747


Working for me today.