Jamf は、リモートサポートのセッション中に、クライアントの Mac に TeamViewer QuickSupport アプリケーションをダウンロードすることを推奨します。この際、ソフトウェアを事前にインストールする必要はありません。ただし、以下の手順で、TeamViewer または TeamViewer Host アプリケーションのいずれかを事前にインストールすることができます。
Note:
エンドユーザの Mac コンピュータにインストールされた TeamViewer アプリケーションにおいて、ライセンスは不要です。TeamViewer のスクリプトは、Composer を使用した再パッケージ化を回避します。
Requirements
「Install TeamViewer.pkg」インストーラ、または「Install TeamViewerHost.pkg」インストーラ
「Install TeamViewer with Choices」スクリプト、または「Install TeamViewer Host with Choices」スクリプト
- TeamViewer macOS 版のページから、TeamViewer または TeamViewer Host をダウンロードします。
- DMG ファイルを開きます。
- 「Install TeamViewer.app」または「Install TeamViewer Host.app」を右クリックし、パッケージ内容を表示 を選択します。
- 目次 > リソース を開きます。「Install TeamViewer.pkg」または「Install TeamViewerHost.pkg」のパッケージを Jamf Pro > 設定 > コンピュータ管理 > パッケージ にアップロードします。
- 以下から希望するスクリプトを選んでそれを Jamf Pro > 設定 > コンピュータ管理 > スクリプト に追加します。
Install TeamViewer with Choices
#!/bin/zsh function logmessage() { if [ $? = 0 ] ; then echo "$1" else echo "$2" echo "Aborting script" cleanup exit 1 fi } function cleanup() { /bin/rm -Rf "$tempDirectory" logmessage "Removed temporary items." "Failed removing temporary items." /bin/rm -f "/Library/Application Support/JAMF/Waiting Room/Install TeamViewer.pkg" && /bin/rm -Rf "/Library/Application Support/JAMF/Waiting Room/Install TeamViewer.pkg.cache.xml" logmessage "Removed TeamViewer package and supporting files from Jamf Waiting Room." "Failed Removing TeamViewer package and supporting files from Jamf Waiting Room." } choicesXML='<?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"> <array> <dict> <key>attributeSetting</key> <integer>1</integer> <key>choiceAttribute</key> <string>selected</string> <key>choiceIdentifier</key> <string>com.teamviewer.teamviewerPriviledgedHelper</string> </dict> <dict> <key>attributeSetting</key> <integer>1</integer> <key>choiceAttribute</key> <string>selected</string> <key>choiceIdentifier</key> <string>com.teamviewer.teamviewerSilentInstaller</string> </dict> </array> </plist>' # create temporary working directory workDirectory=$( /usr/bin/basename $0 ) tempDirectory=$( /usr/bin/mktemp -d "/private/tmp/$workDirectory.XXXXXX" ) logmessage "Created working directory '$tempDirectory'." "Failed to create working directory '$tempDirectory'." # change directory to temporary working directory cd "$tempDirectory" logmessage "Changed directory to working directory '$tempDirectory'." "Failed to change directory to working directory '$tempDirectory'." echo "$choicesXML" > "$tempDirectory/choices.xml" logmessage "Created choices.xml file in '$tempDirectory'." "Created choices.xml file in '$tempDirectory'." /usr/sbin/installer -pkg "/Library/Application Support/JAMF/Waiting Room/Install TeamViewer.pkg" -applyChoiceChangesXML "$tempDirectory/choices.xml" -target / logmessage "Installed TeamViewer package with choices." "Failed to install TeamViewer package with choices." cleanup exit 0Install TeamViewer Host with Choices
#!/bin/zsh function logmessage() { if [ $? = 0 ] ; then echo "$1" else echo "$2" echo "Aborting script" cleanup exit 1 fi } function cleanup() { /bin/rm -Rf "$tempDirectory" logmessage "Removed temporary items." "Failed removing temporary items." /bin/rm -f "/Library/Application Support/JAMF/Waiting Room/Install TeamViewerHost.pkg" && /bin/rm -Rf "/Library/Application Support/JAMF/Waiting Room/Install TeamViewerHost.pkg.cache.xml" logmessage "Removed TeamViewer Host package and supporting files from Jamf Waiting Room." "Failed Removing TeamViewer Host package and supporting files from Jamf Waiting Room." } choicesXML='<?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"> <array> <dict> <key>attributeSetting</key> <integer>1</integer> <key>choiceAttribute</key> <string>selected</string> <key>choiceIdentifier</key> <string>com.teamviewer.teamviewerPriviledgedHelper</string> </dict> <dict> <key>attributeSetting</key> <integer>1</integer> <key>choiceAttribute</key> <string>selected</string> <key>choiceIdentifier</key> <string>com.teamviewer.teamviewerhostSilentInstaller</string> </dict> </array> </plist>' # create temporary working directory workDirectory=$( /usr/bin/basename $0 ) tempDirectory=$( /usr/bin/mktemp -d "/private/tmp/$workDirectory.XXXXXX" ) logmessage "Created working directory '$tempDirectory'." "Failed to create working directory '$tempDirectory'." # change directory to temporary working directory cd "$tempDirectory" logmessage "Changed directory to working directory '$tempDirectory'." "Failed to change directory to working directory '$tempDirectory'." echo "$choicesXML" > "$tempDirectory/choices.xml" logmessage "Created choices.xml file in '$tempDirectory'." "Created choices.xml file in '$tempDirectory'." /usr/sbin/installer -pkg "/Library/Application Support/JAMF/Waiting Room/Install TeamViewerHost.pkg" -applyChoiceChangesXML "$tempDirectory/choices.xml" -target / logmessage "Installed TeamViewerHost package with choices." "Failed to install TeamViewerHost package with choices." cleanup exit 0
- 手順 4 で作成した DMG とインストーラスクリプトを使用して、TeamViewer をインストールするポリシーを作成します。次のことを確認します。
TeamViewer パッケージが インストール ではなく キャッシュ に設定されている。
TeamViewer スクリプトの優先順位が After (後) に設定されている。
ポリシーの作成方法については、ポリシーの管理 を参照してください。
コンピュータ上のポリシーは、次回 Jamf Pro へチェックインする際に 一般 ペイロードのクライテリアを満たす スコープ内で実行されます。