Posted on 10-28-2019 05:08 AM
Hi,
I am currently trying to replace Teamviewer 12 Host with Teamviewer 14 Host.
I previously found a script on here and got it to work using Dropbox to host the PKG and Assignment files, as seen in the below script. Teamviewer have now bundled the Assignment file with the installer but trying to call this doesn't seem to work via Jamf. If I run it in Terminal, or from a local script file it will work but neither option works when calling from Jamf.
I can continue Installing v12 and then running the v14 installer on top, which will retain the assignment but I'd rather it was installing cleanly on new devices.
Run Assignment Tool (trying to run this directly from Jamf)
/Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token *******-********************* -group-id g******** -alias "${ComputerName}" -grant-easy-access -wait 10
or creating a PKG to drop the Assign.sh file locally and calling it via the Jamf script
sh "/Library/Application Support/TV/Assign.sh"
#!/bin/bash
#This will get the computer name
ComputerName=$(/usr/sbin/scutil --get ComputerName)
#This will download the items needed to install and configure Teamviewer
set -eux
mkdir -p /Users/Shared/Teamviewer
cd /Users/Shared/Teamviewer
curl -L https://www.dropbox.com/s/*******************************.pkg?dl=1 -o Install%20TeamViewerHost-idc**x******.pkg
# curl -L https://www.dropbox.com/s/**********************************?dl=1 -o TeamViewer_Assignment
# Install Teamviewer and give launch permissions to Teamviewer_Assignment
# chmod +x TeamViewer_Assignment
/usr/sbin/installer -pkg "/Users/Shared/Teamviewer/Install%20TeamViewerHost-idc**x****.pkg" -target /
#Start Teamviewer Services
launchctl load /Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist
launchctl load /Library/LaunchAgents/com.teamviewer.teamviewer_desktop.plist
launchctl load /Library/LaunchAgents/com.teamviewer.teamviewer.plist
#Shutdown Teamviewer Services
launchctl unload /Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist
launchctl unload /Library/LaunchAgents/com.teamviewer.teamviewer_desktop.plist
launchctl unload /Library/LaunchAgents/com.teamviewer.teamviewer.plist
#Run Assignment Tool (both commented out for now as neither work)
#/Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token *******-********************* -group-id g******** -alias "${ComputerName}" -grant-easy-access -wait 10
#sh "/Library/Application Support/TV/Assign.sh"
#Launch TeamViewer Service
launchctl load /Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist
launchctl load /Library/LaunchAgents/com.teamviewer.teamviewer_desktop.plist
launchctl load /Library/LaunchAgents/com.teamviewer.teamviewer.plist
#Cleanup
rm -rf "/Users/Shared/Teamviewer"
In Jamf logs I see Error running script: return code was 206.
Hopefully someone can point me in the right direction!
Thanks
David
Solved! Go to Solution.
Posted on 10-28-2019 09:42 AM
I shared this to MacAdmins Slack #TeamViewer channel - hope it helps:
#!/bin/bash
cd /tmp
#Download and Install custom host
echo "Downloading and Installing custom host"
cd /tmp
curl -O https://dl.tvcdn.de/download/version_14x/CustomDesign/Install%20TeamViewerHost-idc########.pkg
installer -pkg Install%20TeamViewerHost-idc########.pkg -target /
#echo "10 seconds wait"
sleep 10
#Assignment
echo "Running the account assignment"
computername=$(hostname -s)
sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <APITOKEN> -alias $computername -group-id g########
#echo "10 seconds wait"
sleep 10
Posted on 10-28-2019 09:42 AM
I shared this to MacAdmins Slack #TeamViewer channel - hope it helps:
#!/bin/bash
cd /tmp
#Download and Install custom host
echo "Downloading and Installing custom host"
cd /tmp
curl -O https://dl.tvcdn.de/download/version_14x/CustomDesign/Install%20TeamViewerHost-idc########.pkg
installer -pkg Install%20TeamViewerHost-idc########.pkg -target /
#echo "10 seconds wait"
sleep 10
#Assignment
echo "Running the account assignment"
computername=$(hostname -s)
sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <APITOKEN> -alias $computername -group-id g########
#echo "10 seconds wait"
sleep 10
Posted on 07-08-2022 12:15 PM
Hey Kevin,
I am trying to push TV from JAMF using the method here: https://docs.jamf.com/10.32.0/jamf-pro/administrator-guide/TeamViewer_Integration.html. Everything is working however the computers are not joining TV console like David said above. I am a noob when it comes to this stuff so where exactly does your script go. Would I put this after the install is completed?
Posted on 07-08-2022 12:23 PM
FYI I am on 15.31.5 as of today.
Posted on 10-28-2019 09:57 AM
The script from Kevin.v resolved this for me. Have managed to run this against a device with TV14 installed but not assigned and on a fresh build and both clients are now assigned to the company account!
Thanks Kevin :)
Posted on 11-25-2020 02:38 PM
The install command was broken until I updated the curl command to use the FQDN. I updated curl -O https://dl.tvcdn.de/download/version_15x/CustomDesign/Install%20TeamViewerHost-idc########.pkg to curl -L https://download.teamviewer.com/download/version_15x/CustomDesign/Install%20TeamViewerHost-idcXXXXXX.pkg -o ~/tmp/TeamViewerHost-idcXXXXXX.pkg
Posted on 11-24-2022 09:54 AM
Thanks for this helped loads.. and works well, I included the easy access option too.
But....
Do you know if there is a way to disable the Initial setup window? As it makes a nice clean install become messy due to more windows which are not needed.. its on 15.35.5..
Thanks
Posted on 02-26-2024 02:05 AM
I got all the time "
installer: Error - the package path specified was invalid: 'Install%20TeamViewerHost-idc6iu22ji.pkg'.
Running the account assignment" from that script, anyone have same?