一般的なパラメータ
下表は、よく使用されるパラメータを示します。
| パラメータ | 説明 | 値の例 |
|---|---|---|
-windowType | ウィンドウのスタイル | utility、hud、または fs |
-title | ウィンドウタイトルテキスト | "Software Update" |
-description | メインメッセージテキスト | "Updates are being installed..." |
-button1 | プライマリボタンテキスト | "OK" |
-button2 | セカンダリボタンテキスト (オプション) | "Cancel" |
-icon | アイコンファイルへのパス | /System/Library/CoreServices/Software Update.app/Contents/Resources/SoftwareUpdate.icns |
-timeout | 自動終了時間 (秒) | 60 |
使用可能なすべてのパラメータとその使用方法の完全なリストについては、-help パラメータを使用して管理対象コンピュータで Jamf Helper を実行してください。
/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -help
使用例
- タイムアウト付きのメッセージを表示する
#!/bin/bash "/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" \ -windowType "hud" \ -title "Maintenance Notice" \ -description "Maintenance will begin in 5 minutes. Please save your work." \ -timeout 300 \ -countdown- ユーザの確認をリクエストする
#!/bin/bash "/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" \ -windowType "utility" \ -title "Software Installation" \ -description "Click Install to begin the installation process." \ -button1 "Install" \ -button2 "Cancel" \ -defaultButton 1- ユーザ入力をリクエストする
#!/bin/bash # Ask user for their current work location "/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" \ -windowType "utility" \ -title "Work Location" \ -heading "Where are you working today?" \ -description "Please select your current work location so we can apply the correct network settings." \ -icon "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Network.icns" \ -button1 "Office" \ -button2 "Remote" \ -defaultButton 1 SELECTION=$? # Store the response case $SELECTION in 0) LOCATION="Office";; 2) LOCATION="Remote";; *) LOCATION="No selection made";; esac # Display confirmation "/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" \ -windowType "utility" \ -title "Thank You" \ -description "Your location ($LOCATION) has been recorded." \ -icon "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ToolbarFavoritesIcon.icns" \ -button1 "OK"注:この例は、ユーザ入力を収集する基本的な概念を示しています。本番環境で使用する場合は、拡張属性の更新など、収集したデータを保存するコードを追加する必要があります。完全な実装の詳細については、IT 管理者にお問い合わせください。