Yearly Archive 5 September 2025

ByDan Ashley

SCRIPT | Install-TableauDesktop-Latest

Install Tableau Desktop

Summary

This script will install the latest version of Tableau Desktop.


Script Content

#!/bin/bash
cd "/Library/Application Support/JAMF/tmp"

# Update variables. These shouldn't need to change for each update
dmgname="TableauDesktop.dmg"
pkgname="Tableau Desktop.pkg"
apptoreplacerunningname="Tableau"

# Determine CPU architecture for download
arch=$(/usr/bin/arch)
if [ "$arch" == "arm64" ]; then
	dmglink="https://www.tableau.com/downloads/desktop/mac-arm64"
	echo "Running process to download arm64 version"
else
	dmglink="https://www.tableau.com/downloads/desktop/mac"
	echo "Running process to download x86_64 version"
fi

# Download DMG
curl -L -o $dmgname "$dmglink"

# Mount DMG
hdiutil mount -nobrowse $dmgname

# Grab the name of the mounted .dmg as it changes with each version
dmgmountedname=`ls /Volumes | grep "Tableau"`
echo "The DMG mounted is: $dmgmountedname"

# Grab the name of the currently installed Tableau version, if present, as it changes with each version.
cd "/Applications"
apptoreplace=`ls | grep "Tableau"`

# If Tableau Desktop is already installed, remove it prior to installing the latest version.
if [ "$apptoreplace" != "" ]; then
	echo "The currently installed Tableau application is: $apptoreplace"
	# Kill the app if it is running
	echo "Killing the app if it is running..."
	killall -Kill "$apptoreplacerunningname"
	echo "Removing /Applications/$apptoreplace prior to installing..."
	rm -rf "/Applications/$apptoreplace"
else
	echo "No existing versions of Tableau Desktop detected."
fi

# Install the PKG from the DMG
sudo installer -pkg "/Volumes/$dmgmountedname/$pkgname" -target /

# Unmount the DMG
hdiutil unmount "/Volumes/$dmgmountedname"

# Remove the downloaded DMG
cd "/Library/Application Support/JAMF/tmp"
rm $dmgname

# Clear out the used variables
unset dmgname
unset dmglink
unset pkgname
unset dmgmountedname
unset apptoreplace
unset apptoreplacerunningname
exit 0

Concluding Comments

This script will install the latest version of the Tableau Desktop application.

ByDan Ashley

SCRIPT | Install-NordVPN-Latest

Install NordVPN

Summary

This script will install the latest version of NordVPN.


Script Content

#!/bin/bash
cd "/Library/Application Support/JAMF/tmp"

# Update variables. These shouldn't need to change for each update
pkgname="NordVPN.pkg"
pkglink="https://downloads.nordcdn.com/apps/macos/generic/NordVPN-OpenVPN/latest/NordVPN.pkg"
apptoupdaterunningname="NordVPN"

# Download PKG
curl -L -o "$pkgname" "$pkglink"

sleep 10

# Kill the app if it is running
killall -Kill "$apptoupdaterunningname"

# Install PKG
sudo installer -pkg $pkgname -target /

# Remove the downloaded PKG
rm $pkgname

# Clear out the used variables
unset pkgname
unset pkglink
unset apptoupdaterunningname
exit 0

Concluding Comments

This script will install the latest version of the NordVPN application.

ByDan Ashley

SCRIPT | Install-ParallelsDesktop26-Latest

Install Parallels Desktop 26

Summary

This script will install the latest version of Parallels Desktop 26.


Script Content

#!/bin/bash

cd "/Library/Application Support/JAMF/tmp"

# Update variables. These shouldn't need to change for each update
	dmgName="ParallelsDesktop.dmg"
	dmgLink="https://link.parallels.com/pdfm/v26/dmg-download/?experience=enter_key"
	appRunningName="Parallels Desktop"
	appServiceRunningName1="prlctl"
	appServiceRunningName2="prl_client_app"
	appName="Parallels Desktop.app"


# Parallels Desktop license key
	# Uncomment 'licenseKey' variable below and add license key to enable activation
	#licenseKey="XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX"


# Download latest Parallels Desktop DMG
	echo "Downloading latest Parallels Desktop DMG..."
	curl -L -o $dmgName "$dmgLink"


# Mount the Parallels Desktop .DMG
	echo "Mounting $dmgName..."
	hdiutil mount -nobrowse $dmgName

	# Grab the name of the mounted .dmg as it changes with each version
	dmgMountedName=`ls /Volumes | grep "Parallels"`
	echo "The DMG mounted is: $dmgMountedName"


# Check to see if Parallels Desktop is install, then if it is ensure it is not running
	echo "Checking for any existing installation of Parallels Desktop..."

	if [ -d "/Applications/$appName" ]; then
		ParallelsVersion=`defaults read "/Applications/$appName/Contents/version.plist" CFBundleShortVersionString` 
		echo "The currently installed version of Parallels Desktop is v$ParallelsVersion"

		# Kill the app if it is running
		echo "Killing the app if it is running..."
		killall -Kill "$appRunningName"
		killall -Kill "$appServiceRunningName1"
		killall -Kill "$appServiceRunningName2"
		rm -rf "/Applications/$appName"
	else
		echo "No existing versions of Parallels Desktop detected."
	fi


# Install Parallels Desktop from DMG
	echo "Starting Parallels Desktop installation..."

	"/Volumes/$dmgMountedName/$appName/Contents/MacOS/inittool" install -t "/Applications/$appName" -s

	if [ -d "/Applications/$appName" ]; then
		ParallelsVersion=`defaults read "/Applications/$appName/Contents/version.plist" CFBundleShortVersionString`
		echo "Parallels Desktop version $ParallelsVersion is now installed."
	else
		echo "Parallels Desktop has failed to install correctly."
		exit 1
	fi


# Activate Parallels Desktop license
	echo "Determining license activation method..."

	if [ "$licenseKey" != "" ]; then
		sudo prlsrvctl install-license -k $licenseKey
		echo "Parallels Desktop has been activated using license key."
	else
		echo "No license provided. Parallels Desktop will require activating manually upon use."
	fi


# Unmount the DMG
	hdiutil unmount "/Volumes/$dmgMountedName"


# Remove the downloaded DMG
	rm "/Library/Application Support/JAMF/tmp/$dmgName"


# Clear out the used variables
	unset dmgName
	unset dmgLink
	unset appRunningName
	unset appServiceRunningName1
	unset appServiceRunningName2
	unset appName
	unset licenseKey
	unset dmgMountedName
	unset ParallelsVersion

exit 0

Concluding Comments

This script will install the latest version of the Parallels Desktop 26 application.