Admin Pkg

VMware InstallBuilder 24.

202412031052561_498x201 https://installbuilder.com

|

[bash]インストール済みパッケージの情報の収集


サンプルコード

サンプルソース(参考)
行番号ソース
001#!/bin/bash
002# インストールPKGの情報の収集
003#実行ユーザー
004STAT_USR=$(/usr/bin/stat -f%Su /dev/console)
005/bin/echo "STAT_USR(console): $STAT_USR"
006STR_OUTPUT_STRING="ユーザーID: ${STAT_USR}\n"
007#OSバージョン
008STR_VALUE=$(/usr/libexec/PlistBuddy -c "Print:ProductVersion" "/System/Library/CoreServices/SystemVersion.plist")
009STR_OUTPUT_STRING="${STR_OUTPUT_STRING}OSver: ${STR_VALUE}\n\n"
010#テンポラリー(テキストファイルの保存先 再起動時に自動削除)
011STR_CONF_DIR=$(/usr/bin/sudo -u "$STAT_USR" /usr/bin/getconf "DARWIN_USER_TEMP_DIR")
012/bin/echo "DARWIN_USER_TEMP_DIR: $STR_CONF_DIR"
013STR_UUID=$(/usr/bin/uuidgen)
014STR_TMP_DIR_PATH="${STR_CONF_DIR}/getPkgInfo.${STR_UUID}"
015TMP_DIR=$(/usr/bin/sudo -u "$STAT_USR" /usr/bin/mktemp -d "$STR_TMP_DIR_PATH")
016/bin/echo "TMP_DIR: $TMP_DIR"
017#保存ファイル名とパス
018STR_SAVE_FILE_NAME="PKGINFO.txt"
019PATH_SAVE_FILE="${TMP_DIR}/${STR_SAVE_FILE_NAME}"
020#Libraryチェック
021PATH_PLIST="/Library/Receipts/InstallHistory.plist"
022STR_RESPONSE=$(/usr/libexec/PlistBuddy -c "Print:" "$PATH_PLIST" | tr -d '\n\t ')
023NUM_CNT_ARRAY=$(/bin/echo "$STR_RESPONSE" | grep -o "Dict" | wc -l | tr -d ' ')
024STR_OUTPUT_STRING="${STR_OUTPUT_STRING}総件数: ${NUM_CNT_ARRAY}\n\n"
025#主要データのみテキストにする
026for ((itemNO = 0; itemNO <= (NUM_CNT_ARRAY - 1); itemNO++)); do
027  STR_VALUE=$(/usr/libexec/PlistBuddy -c "Print:${itemNO}:date" "$PATH_PLIST")
028  STR_OUTPUT_STRING="${STR_OUTPUT_STRING}${STR_VALUE}"
029  STR_VALUE=$(/usr/libexec/PlistBuddy -c "Print:${itemNO}:displayName" "$PATH_PLIST")
030  STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\n${STR_VALUE}"
031  STR_VALUE=$(/usr/libexec/PlistBuddy -c "Print:${itemNO}:packageIdentifiers:0" "$PATH_PLIST")
032  STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\n${STR_VALUE}\n\n"
033done
034# var/db チェック
035PATH_DB_DIR="/private/var/db/receipts"
036#LIST_FILE_NAME=$(/bin/ls "${PATH_DB_DIR}")
037LIST_FILE_NAME=("$PATH_DB_DIR"/*)
038#LIST_FILE_NAME=$(/usr/bin/find "$PATH_DB_DIR" -type f)
039STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\n■PLIST\n"
040for ITEM_FILENAME in "${LIST_FILE_NAME[@]}"; do
041  # /bin/echo "${PATH_DB_DIR}/${ITEM_FILENAME}"
042  STR_EXTENSION="${ITEM_FILENAME##*.}"
043  if [[ "$STR_EXTENSION" == "plist" ]]; then
044    #PLISTの内容を取得
045    STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\n\n${ITEM_FILENAME}"
046    STR_VALUE=$(/usr/libexec/PlistBuddy -c "Print:InstallDate" "$ITEM_FILENAME")
047    STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\nInstallDate: ${STR_VALUE}"
048    STR_VALUE=$(/usr/libexec/PlistBuddy -c "Print:PackageFileName" "$ITEM_FILENAME")
049    STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\nPackageFileName: ${STR_VALUE}"
050    STR_VALUE=$(/usr/libexec/PlistBuddy -c "Print:PackageIdentifier" "$ITEM_FILENAME")
051    STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\nPackageIdentifier: ${STR_VALUE}"
052    STR_VALUE=$(/usr/libexec/PlistBuddy -c "Print:InstallPrefixPath" "$ITEM_FILENAME")
053    STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\nInstallPrefixPath: ${STR_VALUE}"
054    STR_VALUE=$(/usr/libexec/PlistBuddy -c "Print:PackageFileName" "$ITEM_FILENAME")
055    STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\nPackageFileName: ${STR_VALUE}\n\n"
056  fi
057done
058
059STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\n■BOM:\n"
060for ITEM_FILENAME in "${LIST_FILE_NAME[@]}"; do
061  # /bin/echo "${PATH_DB_DIR}/${ITEM_FILENAME}"
062  STR_EXTENSION="${ITEM_FILENAME##*.}"
063  if [[ "$STR_EXTENSION" == "bom" ]]; then
064    #BOMの内容を取得
065    STR_BOM_TEXT=$(/usr/bin/lsbom -sf "${ITEM_FILENAME}")
066    STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\n\n${LIST_FILE_NAME}"
067    STR_OUTPUT_STRING="${STR_OUTPUT_STRING}\n${STR_BOM_TEXT}\n\n"
068  fi
069done
070
071#保存して
072/usr/bin/printf "$STR_OUTPUT_STRING" >"$PATH_SAVE_FILE"
073#開く
074/usr/bin/open -b "com.apple.TextEdit" "$PATH_SAVE_FILE"
075
076exit 0
AppleScriptで生成しました

|

[LINK]パッケージ インストール関連ドキュメント

Flat Package Formatl


Managed Installs
https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/SoftwareDistribution4/Managed_Installs/Managed_Installs.html#//apple_ref/doc/uid/TP40004615-CH6-SW9

Jamf Composer - a Mac package manager
https://app.jamfnow.com/account/composer
Composer User Guide
https://docs.jamf.com/composer/10.27.0/user-guide/Composer_Overview.html
Building and Signing Mac Packages
https://learn.jamf.com/bundle/jamf-now-documentation/page/Building_and_Signing_Mac_Packages.html


Packages
http://s.sudre.free.fr/Software/Packages/about.html

Iceberg
http://s.sudre.free.fr/Software/Iceberg.html

Suspicious Package
https://mothersruin.com/software/SuspiciousPackage/

Pacifist
https://www.charlessoft.com



Payload-Free Packages
Creating payload-free packages with pkgbuild
https://derflounder.wordpress.com/2012/08/15/creating-payload-free-packages-with-pkgbuild/
Understanding Payload-Free Packages
https://derflounder.wordpress.com/2014/06/01/understanding-payload-free-packages/

script-to-package-tool-for-macos
https://github.com/SAP/script-to-package-tool-for-macos

quickpkg
https://github.com/scriptingosx/quickpkg




いずれにせよ
有効な証明書が必要になる

|

[pkg]パッケージ解凍v4


AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#! /usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#
004#
005#V3フォルダ名を明確にした
006#V4解凍のコマンドを変更
007# com.cocolog-nifty.quicktimer.icefloe
008----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
009##自分環境がos12なので2.8にしているだけです
010use AppleScript version "2.8"
011use framework "Foundation"
012use framework "AppKit"
013use scripting additions
014
015
016property refMe : a reference to current application
017
018######ファイルのオープン
019on run
020  set theWithPrompt to "flat packageを拡張してbundles packageに変換します"
021  set theDefLoc to path to downloads folder from user domain
022  set theFileTypeList to {"com.apple.installer-package-archive"} as list
023  set aliasFilePathAlias to (choose file default location theDefLoc ¬
024    with prompt theWithPrompt ¬
025    of type theFileTypeList ¬
026    invisibles true ¬
027    with showing package contents without multiple selections allowed)
028  open aliasFilePathAlias
029end run
030
031######ドロップのオープン
032on open aliasFilePathAlias
033  
034  set appFileManager to refMe's NSFileManager's defaultManager()
035  set appShardWorkspace to refMe's NSWorkspace's sharedWorkspace()
036  
037  ####選択したパッケージのパス
038  set strOrigFilePath to POSIX path of aliasFilePathAlias as text
039  set ocidOrigPkgFilePath to (refMe's NSString's stringWithString:strOrigFilePath)
040  set ocidOrigFileName to ocidOrigPkgFilePath's lastPathComponent()
041  set strBaseFileName to ocidOrigFileName's stringByDeletingPathExtension()
042  
043  ####ユーザーダウンロードフォルダ
044  set ocidUserDownloadsPathArray to (appFileManager's URLsForDirectory:(refMe's NSDownloadsDirectory) inDomains:(refMe's NSUserDomainMask))
045  set ocidUserDownloadsPathURL to ocidUserDownloadsPathArray's objectAtIndex:0
046  #####展開フォルダ名
047  set strDirName to ("解凍済" & strBaseFileName) as text
048  set ocidSaveDirPathURL to ocidUserDownloadsPathURL's URLByAppendingPathComponent:(strDirName)
049  ###フォルダを作る
050  set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
051  ocidAttrDict's setValue:511 forKey:(refMe's NSFilePosixPermissions)
052  set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error| :(reference)
053  
054  
055  ###pkgの展開先
056  set ocidExpandPkgPathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:(strBaseFileName)
057  set strSaveDirPathURL to ocidExpandPkgPathURL's |path|() as text
058  ####コマンド実行
059  set theComandText to "/usr/sbin/pkgutil  --expand-full  \"" & strOrigFilePath & "\" \"" & strSaveDirPathURL & "\"" as text
060  do shell script theComandText
061  ####展開 パッケージを調べて
062  set listResult to appFileManager's contentsOfDirectoryAtURL:ocidExpandPkgPathURL includingPropertiesForKeys:{refMe's NSURLPathKey} options:0  |error| :(reference)
063  set listFilePathURLArray to item 1 of listResult
064  ####内包されているファイル
065  repeat with itemFilePathURLArray in listFilePathURLArray
066    ####拡張子PKGだけ実施
067    set strExtension to itemFilePathURLArray's pathExtension() as text
068    if strExtension is "pkg" then
069      set ocidPkgName to itemFilePathURLArray's lastPathComponent()
070      
071      #####Payloadをdittoする
072      set strPkgFolderName to (ocidPkgName as text) & "_Folder"
073      set ocidDistPathURL to (ocidSaveDirPathURL's URLByAppendingPathComponent:strPkgFolderName)
074      set boolMoveFileAndRename to (appFileManager's moveItemAtURL:itemFilePathURLArray toURL:ocidDistPathURL  |error| :(reference))
075      set ocidPayLoardPathURL to (ocidDistPathURL's URLByAppendingPathComponent:"Payload")
076      set strPayLoardPathURL to ocidPayLoardPathURL's |path|() as text
077      set strSaveDirPathURL to (ocidPayLoardPathURL's URLByDeletingLastPathComponent())'s |path|() as text
078      #####解凍コピー
079      try
080        set theComandText to ("/usr/bin/ditto  -xz   \"" & strPayLoardPathURL & "\"   \"" & strSaveDirPathURL & "\"") as text
081        do shell script theComandText
082      end try
083    end if
084  end repeat
085  #############################
086  ###Finderでフォルダを開く
087  #############################
088  appShardWorkspace's openURL:ocidExpandPkgPathURL
089end open
AppleScriptで生成しました

|

[pkg]管理者でインストール パスワードチェックを最初にするように変更した


AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#! /usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#com.cocolog-nifty.quicktimer.icefloe
004# 【注意事項】必ず 『実行専用』の『アプリケーション』にしてください
005#管理者パスワードが平文で記述される事になりますので
006#セキュリティには留意ください
007#また
008#厳密にはログに管理者パスワードが平文で流れますので
009#使用はインハウス等に限定された方がいいかもしれません
010#
011#v2 パスワードチェックを最初にやるように変更
012----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
013use AppleScript version "2.8"
014use framework "Foundation"
015use framework "AppKit"
016use scripting additions
017
018property refMe : a reference to current application
019
020######################################
021#設定項目
022#インストールするパッケージのURL(DMGじゃダメよ)
023set strPkgURL to ("https://ardownload3.adobe.com/pub/adobe/acrobat/mac/AcrobatDC/2400220857/AcroRdrSCADC2400220857_MUI.pkg") as text
024
025#管理者ユーザー名(ショート)
026set strAdminUserName to ("admin") as text
027#管理者パスワード
028set strAuthPW to ("管理者パスワード") as text
029#報告メールの送信先
030property strAdminEmail : ("foo@hoge.com") as text
031
032######################################
033#何はなくても最初にパスワードチェック
034set strCommandText to ("/usr/bin/sudo /bin/date") as text
035log strCommandText
036try
037  do shell script strCommandText user name strAdminUserName password strAuthPW with administrator privileges
038on error
039  log doDialog("パスワードチェックでエラーしました\nパスワードが違います")
040  return "パスワードが違います"
041end try
042######################################
043#保存先 ダウンロードフォルダ ocidDownloadDirPathURL
044set appFileManager to refMe's NSFileManager's defaultManager()
045set ocidTempDirURL to appFileManager's temporaryDirectory()
046set ocidUUID to refMe's NSUUID's alloc()'s init()
047set ocidUUIDString to ocidUUID's UUIDString
048set ocidDownloadDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:(true)
049#フォルダを作る これだけアクセス権777
050set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
051ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
052set listDone to appFileManager's createDirectoryAtURL:(ocidDownloadDirPathURL) withIntermediateDirectories:(true) attributes:(ocidAttrDict) |error| :(reference)
053if (item 1 of listDone) is true then
054  log "【1】正常処理"
055  set ocidLogFilePathURL to ocidDownloadDirPathURL's URLByAppendingPathComponent:("_このフォルダは削除しても大丈夫です.txt") isDirectory:(false)
056  set ocidLogStr to refMe's NSString's stringWithString:("このフォルダは削除しても大丈夫です")
057  set listDone to ocidLogStr's writeToURL:(ocidLogFilePathURL) atomically:(true) encoding:(refMe's NSUTF8StringEncoding) |error| :(reference)
058  if (item 1 of listDone) is true then
059    set strLogFilePath to (ocidLogFilePathURL's |path|()) as text
060    log "【2】正常処理"
061  else if (item 2 of listDone) ≠ (missing value) then
062    set strErrorNo to (item 2 of listDone)'s code() as text
063    set strDescription to (item 2 of listDone)'s localizedDescription() as text
064    log doDialog("【2】でエラーしました\n" & strErrorNo & "\n" & strDescription)
065    return "エラーしました"
066  end if
067  
068else if (item 2 of listDone) ≠ (missing value) then
069  set strErrorNo to (item 2 of listDone)'s code() as text
070  set strDescription to (item 2 of listDone)'s localizedDescription() as text
071  log doDialog("【1】でエラーしました\n" & strErrorNo & "\n" & strDescription)
072  return "エラーしました"
073end if
074######################################
075#ダウンロード 本処理
076set ocidURLString to refMe's NSString's stringWithString:(strPkgURL)
077set ocidURL to refMe's NSURL's alloc()'s initWithString:(ocidURLString)
078set strURL to ocidURL's absoluteString() as text
079set ocidFileName to ocidURL's lastPathComponent()
080set strFileName to ocidFileName as text
081#保存パス
082set ocidSavePkgFilePathURL to ocidDownloadDirPathURL's URLByAppendingPathComponent:(ocidFileName) isDirectory:(false)
083set strSavePkgFilePath to (ocidSavePkgFilePathURL's |path|()) as text
084#NSDATA
085set ocidOption to (refMe's NSDataReadingMappedIfSafe)
086set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidURL) options:(ocidOption) |error| :(reference)
087if (item 2 of listResponse) = (missing value) then
088  log "【3】正常処理"
089  set ocidReadData to (item 1 of listResponse)
090  #writeToURL
091  set ocidOption to (refMe's NSDataWritingAtomic)
092  set listDone to ocidReadData's writeToURL:(ocidSavePkgFilePathURL) options:(ocidOption) |error| :(reference)
093  if (item 1 of listDone) is true then
094    log "【4】正常処理"
095  else if (item 2 of listDone) ≠ (missing value) then
096    set strErrorNo to (item 2 of listDone)'s code() as text
097    set strDescription to (item 2 of listDone)'s localizedDescription() as text
098    log doDialog("【4】でエラーしました\n" & strErrorNo & "\n" & strDescription)
099    return "エラーしました"
100  end if
101else if (item 2 of listResponse) ≠ (missing value) then
102  log "initWithContentsOfURL エラーしました CULRを試します"
103  #CULR
104  set strCommandText to ("/usr/bin/curl -v -L -o \"" & strSavePkgFilePath & "\" \"" & strURL & "\" --connect-timeout 20 >> \"" & strLogFilePath & "\" 2>>&1") as text
105  log strCommandText
106  try
107    do shell script strCommandText
108  on error
109    set strErrorNo to (item 2 of listResponse)'s code() as text
110    set strDescription to (item 2 of listResponse)'s localizedDescription() as text
111    log doDialog("【3】でエラーしました\n" & strErrorNo & "\n" & strDescription)
112    return "CURL エラーしました"
113  end try
114end if
115######################################
116#インストール本処理
117set strCommandText to ("/usr/bin/sudo /usr/sbin/installer -pkg \"" & strSavePkgFilePath & "\" -target / -dumplog -verboseR -allowUntrusted -lang ja>> \"" & strLogFilePath & "\"  2>&1") as text
118log strCommandText
119try
120  do shell script strCommandText user name strAdminUserName password strAuthPW with administrator privileges
121  set boolInstallDone to true as boolean
122  log "【5】正常処理"
123on error
124  set strCommandText to ("/bin/cat \"" & strLogFilePath & "\"") as text
125  try
126    set strResponse to (do shell script strCommandText) as text
127  end try
128  set boolInstallDone to false as boolean
129  log "【5】インストール失敗"
130end try
131
132
133######################################
134#インストーラーをゴミ箱に
135set listDone to (appFileManager's trashItemAtURL:(ocidDownloadDirPathURL) resultingItemURL:(ocidDownloadDirPathURL) |error| :(reference))
136if (item 1 of listDone) is true then
137  log "【6】 正常処理"
138else if (item 2 of listDone) ≠ (missing value) then
139  set strErrorNo to (item 2 of listDone)'s code() as text
140  set strDescription to (item 2 of listDone)'s localizedDescription() as text
141  log doDialog("【6】でエラーしました\n" & strErrorNo & "\n" & strDescription)
142  return "trashItemAtURL エラーしました"
143end if
144if boolInstallDone is false then
145  log doDialog("【5】でエラーしました\n" & strResponse & "\n")
146end if
147return
148
149######################################
150#ダイアログ
151to doDialog(argMessage)
152  tell current application
153    set strName to name as text
154  end tell
155  if strName is "osascript" then
156    tell application "Finder"
157      activate
158    end tell
159  else
160    tell current application
161      activate
162    end tell
163  end if
164  try
165    set aliasIconPath to POSIX file "/System/Applications/Mail.app/Contents/Resources/ApplicationIcon.icns" as alias
166    set recordResult to (display dialog "メッセージをメールで送ってください" with title "戻り値です" default answer (argMessage as text) buttons {"クリップボードにコピー", "終了", "メール送信"} default button "クリップボードにコピー" cancel button "終了" giving up after 20 with icon aliasIconPath without hidden answer) as record
167  on error
168    return "エラーしました"
169  end try
170  if (gave up of recordResult) is true then
171    return "時間切れです"
172  end if
173  ##############################
174  #値のコピー
175  if button returned of recordResult is "クリップボードにコピー" then
176    try
177      set strText to text returned of recordResult as text
178      ####ペーストボード宣言
179      set appPasteboard to refMe's NSPasteboard's generalPasteboard()
180      set ocidText to (refMe's NSString's stringWithString:(strText))
181      appPasteboard's clearContents()
182      appPasteboard's setString:(ocidText) forType:(refMe's NSPasteboardTypeString)
183    on error
184      tell application "Finder"
185        set the clipboard to strText as text
186      end tell
187    end try
188  end if
189  ##############################
190  #メール送信
191  if button returned of recordResult is "メール送信" then
192    set strText to text returned of recordResult as text
193    ###コンポーネント初期化
194    set ocidComponents to refMe's NSURLComponents's alloc()'s init()
195    ###スキーム mailtoを追加
196    ocidComponents's setScheme:("mailto")
197    ###パスを追加(setHostじゃないよ)
198    ocidComponents's setPath:(strAdminEmail)
199    #クエリーアイテム
200    set ocidQueryItems to refMe's NSMutableArray's alloc()'s initWithCapacity:(0)
201    set ocidQueryItem to refMe's NSURLQueryItem's alloc()'s initWithName:("subject") value:("【処理終了】処理終了自動送信")
202    ocidQueryItems's addObject:(ocidQueryItem)
203    set ocidQueryItem to refMe's NSURLQueryItem's alloc()'s initWithName:("body") value:(strText)
204    ocidQueryItems's addObject:(ocidQueryItem)
205    #コンポーネントに追加  
206    ocidComponents's setQueryItems:(ocidQueryItems)
207    #URLを再定義
208    set ocidURL to ocidComponents's |URL|
209    #URLを開く(デフォルトのメーラで起動)
210    set appSharedWorkspace to refMe's NSWorkspace's sharedWorkspace()
211    set boolDone to appSharedWorkspace's openURL:(ocidURL)
212    if boolDone is true then
213      log "正常処理"
214      return true
215    else if boolDone is false then
216      log "エラーしました"
217      return false
218    end if
219  end if
220end doDialog
221
222
AppleScriptで生成しました

|

[pkg]管理者でインストール


AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#! /usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#com.cocolog-nifty.quicktimer.icefloe
004# 【注意事項】必ず 『実行専用』の『アプリケーション』にしてください
005#管理者パスワードが平文で記述される事になりますので
006#セキュリティには留意ください
007#また
008#厳密にはログに管理者パスワードが平文で流れますので
009#使用はインハウス等に限定された方がいいかもしれません
010----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
011use AppleScript version "2.8"
012use framework "Foundation"
013use framework "AppKit"
014use scripting additions
015
016property refMe : a reference to current application
017
018######################################
019#設定項目
020#インストールするパッケージのURL(DMGじゃダメよ)
021set strPkgURL to ("https://ardownload3.adobe.com/pub/adobe/acrobat/mac/AcrobatDC/2400220854/AcrobatSCADC2400220854_MUI.pkg") as text
022
023
024#管理者ユーザー名(ショート)
025set strAdminUserName to ("admin") as text
026#管理者パスワード
027set strAuthPW to ("管理者パスワードをここに") as text
028#報告メールの送信先
029property strAdminEmail : ("foo@hoge.com") as text
030
031
032######################################
033#保存先 ダウンロードフォルダ ocidDownloadDirPathURL
034set appFileManager to refMe's NSFileManager's defaultManager()
035set ocidTempDirURL to appFileManager's temporaryDirectory()
036set ocidUUID to refMe's NSUUID's alloc()'s init()
037set ocidUUIDString to ocidUUID's UUIDString
038set ocidDownloadDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:(true)
039#フォルダを作る これだけアクセス権777
040set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
041ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
042set listDone to appFileManager's createDirectoryAtURL:(ocidDownloadDirPathURL) withIntermediateDirectories:(true) attributes:(ocidAttrDict) |error| :(reference)
043if (item 1 of listDone) is true then
044  log "【1】正常処理"
045  set ocidLogFilePathURL to ocidDownloadDirPathURL's URLByAppendingPathComponent:("_このフォルダは削除しても大丈夫です.txt") isDirectory:(false)
046  set ocidLogStr to refMe's NSString's stringWithString:("このフォルダは削除しても大丈夫です")
047  set listDone to ocidLogStr's writeToURL:(ocidLogFilePathURL) atomically:(true) encoding:(refMe's NSUTF8StringEncoding) |error| :(reference)
048  if (item 1 of listDone) is true then
049    set strLogFilePath to (ocidLogFilePathURL's |path|()) as text
050    log "【2】正常処理"
051  else if (item 2 of listDone) ≠ (missing value) then
052    set strErrorNo to (item 2 of listDone)'s code() as text
053    set strDescription to (item 2 of listDone)'s localizedDescription() as text
054    log doDialog("【2】でエラーしました\n" & strErrorNo & "\n" & strDescription)
055    return "エラーしました"
056  end if
057  
058else if (item 2 of listDone) ≠ (missing value) then
059  set strErrorNo to (item 2 of listDone)'s code() as text
060  set strDescription to (item 2 of listDone)'s localizedDescription() as text
061  log doDialog("【1】でエラーしました\n" & strErrorNo & "\n" & strDescription)
062  return "エラーしました"
063end if
064######################################
065#ダウンロード 本処理
066set ocidURLString to refMe's NSString's stringWithString:(strPkgURL)
067set ocidURL to refMe's NSURL's alloc()'s initWithString:(ocidURLString)
068set strURL to ocidURL's absoluteString() as text
069set ocidFileName to ocidURL's lastPathComponent()
070set strFileName to ocidFileName as text
071#保存パス
072set ocidSavePkgFilePathURL to ocidDownloadDirPathURL's URLByAppendingPathComponent:(ocidFileName) isDirectory:(false)
073set strSavePkgFilePath to (ocidSavePkgFilePathURL's |path|()) as text
074#NSDATA
075set ocidOption to (refMe's NSDataReadingMappedIfSafe)
076set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidURL) options:(ocidOption) |error| :(reference)
077if (item 2 of listResponse) = (missing value) then
078  log "【3】正常処理"
079  set ocidReadData to (item 1 of listResponse)
080  #writeToURL
081  set ocidOption to (refMe's NSDataWritingAtomic)
082  set listDone to ocidReadData's writeToURL:(ocidSavePkgFilePathURL) options:(ocidOption) |error| :(reference)
083  if (item 1 of listDone) is true then
084    log "【4】正常処理"
085  else if (item 2 of listDone) ≠ (missing value) then
086    set strErrorNo to (item 2 of listDone)'s code() as text
087    set strDescription to (item 2 of listDone)'s localizedDescription() as text
088    log doDialog("【4】でエラーしました\n" & strErrorNo & "\n" & strDescription)
089    return "エラーしました"
090  end if
091else if (item 2 of listResponse) ≠ (missing value) then
092  log "initWithContentsOfURL エラーしました CULRを試します"
093  #CULR
094  set strCommandText to ("/usr/bin/curl -v -L -o \"" & strSavePkgFilePath & "\" \"" & strURL & "\" --connect-timeout 20 >> \"" & strLogFilePath & "\" 2>>&1") as text
095  log strCommandText
096  try
097    do shell script strCommandText
098  on error
099    set strErrorNo to (item 2 of listResponse)'s code() as text
100    set strDescription to (item 2 of listResponse)'s localizedDescription() as text
101    log doDialog("【3】でエラーしました\n" & strErrorNo & "\n" & strDescription)
102    return "CURL エラーしました"
103  end try
104end if
105######################################
106#インストール本処理
107set strCommandText to ("/usr/bin/sudo /usr/sbin/installer -pkg \"" & strSavePkgFilePath & "\" -target / -dumplog -verboseR -allowUntrusted -lang ja>> \"" & strLogFilePath & "\"  2>&1") as text
108log strCommandText
109try
110  do shell script strCommandText user name strAdminUserName password strAuthPW with administrator privileges
111  set boolInstallDone to true as boolean
112  log "【5】正常処理"
113on error
114  set strCommandText to ("/bin/cat \"" & strLogFilePath & "\"") as text
115  try
116    set strResponse to (do shell script strCommandText) as text
117  end try
118  set boolInstallDone to false as boolean
119  log "【5】インストール失敗"
120end try
121
122
123######################################
124#インストーラーをゴミ箱に
125set listDone to (appFileManager's trashItemAtURL:(ocidDownloadDirPathURL) resultingItemURL:(ocidDownloadDirPathURL) |error| :(reference))
126if (item 1 of listDone) is true then
127  log "【6】 正常処理"
128else if (item 2 of listDone) ≠ (missing value) then
129  set strErrorNo to (item 2 of listDone)'s code() as text
130  set strDescription to (item 2 of listDone)'s localizedDescription() as text
131  log doDialog("【6】でエラーしました\n" & strErrorNo & "\n" & strDescription)
132  return "trashItemAtURL エラーしました"
133end if
134if boolInstallDone is false then
135  log doDialog("【5】でエラーしました\n" & strResponse & "\n")
136end if
137return
138
139######################################
140#ダイアログ
141to doDialog(argMessage)
142  tell current application
143    set strName to name as text
144  end tell
145  if strName is "osascript" then
146    tell application "Finder"
147      activate
148    end tell
149  else
150    tell current application
151      activate
152    end tell
153  end if
154  try
155    set aliasIconPath to POSIX file "/System/Applications/Mail.app/Contents/Resources/ApplicationIcon.icns" as alias
156    set recordResult to (display dialog "メッセージをメールで送ってください" with title "戻り値です" default answer (argMessage as text) buttons {"クリップボードにコピー", "終了", "メール送信"} default button "クリップボードにコピー" cancel button "終了" giving up after 20 with icon aliasIconPath without hidden answer) as record
157  on error
158    return "エラーしました"
159  end try
160  if (gave up of recordResult) is true then
161    return "時間切れです"
162  end if
163  ##############################
164  #値のコピー
165  if button returned of recordResult is "クリップボードにコピー" then
166    try
167      set strText to text returned of recordResult as text
168      ####ペーストボード宣言
169      set appPasteboard to refMe's NSPasteboard's generalPasteboard()
170      set ocidText to (refMe's NSString's stringWithString:(strText))
171      appPasteboard's clearContents()
172      appPasteboard's setString:(ocidText) forType:(refMe's NSPasteboardTypeString)
173    on error
174      tell application "Finder"
175        set the clipboard to strText as text
176      end tell
177    end try
178  end if
179  ##############################
180  #メール送信
181  if button returned of recordResult is "メール送信" then
182    set strText to text returned of recordResult as text
183    ###コンポーネント初期化
184    set ocidComponents to refMe's NSURLComponents's alloc()'s init()
185    ###スキーム mailtoを追加
186    ocidComponents's setScheme:("mailto")
187    ###パスを追加(setHostじゃないよ)
188    ocidComponents's setPath:(strAdminEmail)
189    #クエリーアイテム
190    set ocidQueryItems to refMe's NSMutableArray's alloc()'s initWithCapacity:(0)
191    set ocidQueryItem to refMe's NSURLQueryItem's alloc()'s initWithName:("subject") value:("【処理終了】処理終了自動送信")
192    ocidQueryItems's addObject:(ocidQueryItem)
193    set ocidQueryItem to refMe's NSURLQueryItem's alloc()'s initWithName:("body") value:(strText)
194    ocidQueryItems's addObject:(ocidQueryItem)
195    #コンポーネントに追加  
196    ocidComponents's setQueryItems:(ocidQueryItems)
197    #URLを再定義
198    set ocidURL to ocidComponents's |URL|
199    #URLを開く(デフォルトのメーラで起動)
200    set appSharedWorkspace to refMe's NSWorkspace's sharedWorkspace()
201    set boolDone to appSharedWorkspace's openURL:(ocidURL)
202    if boolDone is true then
203      log "正常処理"
204      return true
205    else if boolDone is false then
206      log "エラーしました"
207      return false
208    end if
209  end if
210end doDialog
211
212
AppleScriptで生成しました

|

インストール履歴を取得する


サンプルコード

サンプルソース(参考)
行番号ソース
001#!/bin/bash
002#com.cocolog-nifty.quicktimer.icefloe
003# /installerHistory.sh の改造版
004# https://github.com/BigMacAdmin/macOS-Stuff/blob/main/installerHistory.sh
005#################################################
006USER_WHOAMI=$(/usr/bin/whoami)
007/bin/echo "実行ユーザー(whoami): $USER_WHOAMI"
008###実行しているユーザー名
009CONSOLE_USER=$(/bin/echo "show State:/Users/ConsoleUser" | /usr/sbin/scutil | /usr/bin/awk '/Name :/ { print $3 }')
010/bin/echo "コンソールユーザー(scutil): $CONSOLE_USER"
011###実行しているユーザー名
012HOME_USER=$(/bin/echo "$HOME" | /usr/bin/awk -F'/' '{print $NF}')
013/bin/echo "実行ユーザー(HOME): $HOME_USER"
014###logname
015LOGIN_NAME=$(/usr/bin/logname)
016/bin/echo "ログイン名(logname): $LOGIN_NAME"
017###UID
018USER_NAME=$(/usr/bin/id -un)
019/bin/echo "ユーザー名(id): $USER_NAME"
020###STAT
021STAT_USR=$(/usr/bin/stat -f%Su /dev/console)
022/bin/echo "STAT_USR(console): $STAT_USR"
023
024########################################
025##保存先
026STR_SAVE_DIR_PATH="/Users/${STAT_USR}/Documents/Apple/system_profiler"
027/bin/mkdir -p "$STR_SAVE_DIR_PATH"
028PLIST_GRN="<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"><plist version=\"1.0\"><array><string>グリーン</string></array></plist>"
029/usr/bin/xattr -w com.apple.metadata:_kMDItemUserTags "$PLIST_GRN" "$STR_SAVE_DIR_PATH"
030STR_DIR_FILE_PATH="$STR_SAVE_DIR_PATH/_このフォルダは削除しても大丈夫です.txt"
031/usr/bin/touch "$STR_DIR_FILE_PATH"
032#保存ファイル
033STR_PLIST_FILE_PATH="$STR_SAVE_DIR_PATH/SPInstallHistoryDataType.plist"
034STR_TEXT_FILE_PATH="$STR_SAVE_DIR_PATH/SPInstallHistoryDataType.txt"
035#データ収集
036/usr/sbin/system_profiler SPInstallHistoryDataType -xml -detailLevel mini >"$STR_PLIST_FILE_PATH"
037#数数えて
038NUM_CNT_DICT=$(/usr/libexec/PlistBuddy -c "Print :0:_items:" "$STR_PLIST_FILE_PATH" | grep -o "Dict" | wc -l)
039STR_NOW_DATE=$(/bin/date "+%Y%m%d" )
040/bin/echo "【$STR_NOW_DATE 作成】インストール履歴は $NUM_CNT_DICT 件です" >"$STR_TEXT_FILE_PATH"
041
042#履歴権数だけ繰り返し
043for ((i = 0; i < NUM_CNT_DICT; i++)); do
044  STR_DATE=$(/usr/libexec/PlistBuddy -c "Print :0:_items:$i:install_date" "$STR_PLIST_FILE_PATH")
045  FORMATTED_DATE=$(/bin/date -j -f "%a %b %d %T %Z %Y" "$STR_DATE" "+%Y%m%d")
046  STR_APP_NAME=$(/usr/libexec/PlistBuddy -c "Print :0:_items:$i:_name" "$STR_PLIST_FILE_PATH")
047  /bin/echo "$FORMATTED_DATE : $STR_APP_NAME" >>"$STR_TEXT_FILE_PATH"
048done
049#終わったら開く
050/usr/bin/open -b com.apple.TextEdit "$STR_TEXT_FILE_PATH"
051
052exit 0
AppleScriptで生成しました

|

RosettaUpdateAuto

/Library/Updates/Rosetta/OnDemand

/Library/Updates/Rosetta/SoftwareUpdate

RosettaUpdateAuto.pkg



#!/bin/bash
#com.cocolog-nifty.quicktimer.icefloe
#################################################
/usr/sbin/softwareupdate --install-rosetta --agree-to-license

/usr/bin/grep RosettaUpdateAuto.pkg /var/log/install.log >"$HOME/Library/Logs/RosettaUpdateAuto.log"

/bin/launchctl kickstart -k -p system/com.apple.oahd


/usr/bin/notifyutil -p com.apple.oah.did-install

exit 0


|

PayloadFreePackageCreator


【スクリプトエディタで開く】|

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#パッケージのみ作成 署名はしないのでそのままでは使えない
#オリジナルは
# https://github.com/rtrouton/Payload-Free-Package-Creator
# ↑このスクリプトを単体にしただけ
# オリジナルがMITライセンスなのでこのスクリプトもMITライセンスになります
#com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use framework "UniformTypeIdentifiers"
use framework "AppKit"
use scripting additions
property refMe : a reference to current application

##バンドルID
set strBundleID to ("com.cocolog-nifty.quicktimer") as text
##バージョン(面倒なので日付にした)
set strVersion to doGetDateNo("yyyyMMdd") as text


#############################
###ダイアログ
tell current application
  set strName to name as text
end tell
####スクリプトメニューから実行したら
if strName is "osascript" then
  tell application "Finder" to activate
else
  tell current application to activate
end if
############ デフォルトロケーション
tell application "Finder"
  set aliasDefaultLocation to (path to desktop folder from user domain) as alias
end tell

############UTIリスト
set listUTI to {"public.bash-script", "public.shell-script", "public.zsh-script"}
set strMes to ("シェルスクリプトファイルを選んでください") as text
set strPrompt to ("シェルスクリプトファイルを選んでください") as text
try
  ### ファイル選択時
  set aliasFilePath to (choose file strMes with prompt strPrompt default location (aliasDefaultLocation) of type listUTI with invisibles and showing package contents without multiple selections allowed) as alias
on error
  log "エラーしました"
return "エラーしました"
end try
###スクリプトのパス
set strFilePath to (POSIX path of aliasFilePath) as text
set ocidFilePathStr to refMe's NSString's stringWithString:(strFilePath)
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidBaseFilePath to ocidFilePath's stringByDeletingPathExtension()
set ocidFileName to ocidBaseFilePath's lastPathComponent()
set strFileName to ocidFileName as text
###テンポラリ内で生成
set appFileManager to refMe's NSFileManager's defaultManager()
set ocidTempDirURL to appFileManager's temporaryDirectory()
##UUIDをフォルダ名とする
set ocidUUID to refMe's NSUUID's alloc()'s init()
set strUUID to ocidUUID's UUIDString as text
set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(strUUID) isDirectory:true
set ocidSaveDirPath to ocidSaveDirPathURL's |path|()
###作業用フォルダUUID
set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
set listBoolMakeDir to appFileManager's createDirectoryAtPath:(ocidSaveDirPath) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
###必要なフォルダ
set ocidPkgDirPath to ocidSaveDirPath's stringByAppendingPathComponent:(strFileName)
set ocidNopayloadDirPath to ocidPkgDirPath's stringByAppendingPathComponent:("nopayload")
set ocidScriptsDirPath to ocidPkgDirPath's stringByAppendingPathComponent:("scripts")
###↑各種フォルダ生成
set listBoolMakeDir to appFileManager's createDirectoryAtPath:(ocidPkgDirPath) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
set listBoolMakeDir to appFileManager's createDirectoryAtPath:(ocidNopayloadDirPath) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
set listBoolMakeDir to appFileManager's createDirectoryAtPath:(ocidScriptsDirPath) withIntermediateDirectories:true attributes:(ocidAttrDict) |error|:(reference)
###postinstallファイルのコピー
set ocidPostinstallFilePath to ocidScriptsDirPath's stringByAppendingPathComponent:("postinstall")
set listDone to appFileManager's copyItemAtPath:(ocidFilePath) toPath:(ocidPostinstallFilePath) |error|:(reference)
#アクセス権777
set listDone to appFileManager's setAttributes:(ocidAttrDict) ofItemAtPath:(ocidPostinstallFilePath) |error|:(reference)
###PKG出来上がり予定パス
set strPkgFileName to (strFileName & "." & strVersion & ".pkg") as text
set ocidPkgFilePath to ocidPkgDirPath's stringByAppendingPathComponent:(strPkgFileName)
###コマンド用にテキスト形式に
set strPkgFilePath to ocidPkgFilePath as text
set strNopayloadDirPath to ocidNopayloadDirPath as text
set strScriptsDirPath to ocidScriptsDirPath as text

###パッケージ作成
##set strCommandText to ("/usr/bin/pkgbuild --identifier \"" & strBundleID & "\" --version \"" & strVersion & "\" --scripts \"" & strScriptsDirPath & "\" --root \"" & strNopayloadDirPath & "\" \"" & strPkgFilePath & "\"") as text

set strCommandText to ("/usr/bin/pkgbuild --nopayload --identifier \"" & strBundleID & "\" --version \"" & strVersion & "\" --scripts \"" & strScriptsDirPath & "\" --root \"" & strNopayloadDirPath & "\"  \"" & strPkgFilePath & "\"") as text
do shell script strCommandText

##スクリプトと同階層に移動
set ocidContainerDirPath to ocidFilePath's stringByDeletingLastPathComponent()
set ocidMovePkgFilePath to ocidContainerDirPath's stringByAppendingPathComponent:(strPkgFileName)
set listDone to appFileManager's moveItemAtPath:(ocidPkgFilePath) toPath:(ocidMovePkgFilePath) |error|:(reference)

return


##############################
### 今の日付日間 テキスト
##############################
to doGetDateNo(argDateFormat)
  ####日付情報の取得
  set ocidDate to current application's NSDate's |date|()
  ###日付のフォーマットを定義
  set ocidNSDateFormatter to current application's NSDateFormatter's alloc()'s init()
ocidNSDateFormatter's setLocale:(current application's NSLocale's localeWithLocaleIdentifier:"ja_JP_POSIX")
  set ocidTimeZone to refMe's NSTimeZone's alloc()'s initWithName:"Asia/Tokyo"
ocidNSDateFormatter's setTimeZone:(ocidTimeZone)
ocidNSDateFormatter's setDateFormat:(argDateFormat)
  set ocidDateAndTime to ocidNSDateFormatter's stringFromDate:ocidDate
  set strDateAndTime to ocidDateAndTime as text
return strDateAndTime
end doGetDateNo

|

インストールしたPKGを忘れるforget


【スクリプトエディタで開く】|

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use framework "UniformTypeIdentifiers"
use framework "AppKit"
use scripting additions

property refMe : a reference to current application

set appFileManager to refMe's NSFileManager's defaultManager()

set strCommandText to ("/usr/sbin/pkgutil --packages") as text
set strResponse to (do shell script strCommandText) as text

set AppleScript's text item delimiters to "\r"
set listPKGID to every text item of strResponse
set AppleScript's text item delimiters to ""



set ocidArrayM to refMe's NSMutableArray's alloc()'s initWithCapacity:(0)
ocidArrayM's addObjectsFromArray:listPKGID

set ocidDescriptor to refMe's NSSortDescriptor's sortDescriptorWithKey:("self") ascending:(yes) selector:"localizedStandardCompare:"
set ocidDescriptorArray to refMe's NSArray's arrayWithObject:(ocidDescriptor)
set ocidSortedArray to ocidArrayM's sortedArrayUsingDescriptors:(ocidDescriptorArray)

set listSortedArray to {} as list

repeat with itemArray in ocidSortedArray
  set end of listSortedArray to (itemArray as text)
end repeat


#############################
###ダイアログ
tell current application
  set strName to name as text
end tell
####スクリプトメニューから実行したら
if strName is "osascript" then
  tell application "Finder" to activate
else
  tell current application to activate
end if
############ デフォルトロケーション
try
  set listResponse to (choose from list listSortedArray with title "選んだください" with prompt "pkgを忘れます" default items (item 1 of listSortedArray) OK button name "OK" cancel button name "キャンセル" without multiple selections allowed and empty selection allowed) as list
on error
  log "エラーしました"
return "エラーしました"
end try
if (item 1 of listResponse) is false then
return "キャンセルしました"
end if
set strPKID to listResponse as text
set strCommandText to ("/usr/bin/sudo /usr/sbin/pkgutil -v --forget '" & strPKID & "'") as text
set strResponse to (do shell script strCommandText) as text
if strResponse is "false" then
  set strCommandText to ("/usr/sbin/pkgutil -v --forget " & strPKID & "") as text
  set strResponse to (do shell script strCommandText) as text
end if

return

|

その他のカテゴリー

Accessibility Acrobat Acrobat 2020 Acrobat AddOn Acrobat Annotation Acrobat ARMDC Acrobat AV2 Acrobat BookMark Acrobat Classic Acrobat DC Acrobat Dialog Acrobat Distiller Acrobat Form Acrobat JS Acrobat Manifest Acrobat Menu Acrobat Open Acrobat Plugin Acrobat Preferences Acrobat Preflight Acrobat python Acrobat Reader Acrobat SCA Acrobat SCA Updater Acrobat Sequ Acrobat Sign Acrobat Stamps Acrobat Watermark Acrobat Windows Acrobat Windows Reader Admin Admin Account Admin Apachectl Admin configCode Admin Device Management Admin LaunchServices Admin Locationd Admin loginitem Admin Maintenance Admin Mobileconfig Admin Permission Admin Pkg Admin Power Management Admin Printer Admin SetUp Admin SMB Admin Support Admin System Information Admin Tools Admin Users Admin Volumes Adobe Adobe FDKO Adobe RemoteUpdateManager AppKit Apple AppleScript AppleScript do shell script AppleScript List AppleScript ObjC AppleScript Osax AppleScript PDF AppleScript Pictures AppleScript record AppleScript Script Editor AppleScript Script Menu AppleScript Shortcuts AppleScript Shortcuts Events AppleScript System Events AppleScript System Events Plist AppleScript Video Applications AppStore Archive Attributes Automator BackUp Barcode Barcode QR Barcode QR Decode Bash Basic Basic Path Bluetooth BOX Browser Calendar CD/DVD Choose Chrome CIImage CityCode CloudStorage Color com.apple.LaunchServices.OpenWith Console Contacts CotEditor CURL current application Date&Time delimiters Desktop Device Diff Disk Dock DropBox Droplet eMail Encode % Encode Decode Encode UTF8 Error EXIFData ffmpeg File Finder Firefox Folder FolderAction Fonts GIF github Guide HTML HTML Entity Icon Illustrator Image Events Image2PDF ImageOptim iPhone iWork Javascript Jedit Json Label Leading Zero List locationd LRC lsappinfo LSSharedFileList m3u8 Mail MakePDF Map Math Media Media AVAsset Media AVconvert Media AVFoundation Media AVURLAsset Media Movie Media Music Memo Messages Microsoft Microsoft Edge Microsoft Excel Mouse Music NetWork Notes NSArray NSArray Sort NSBezierPath NSBitmapImageRep NSBundle NSCFBoolean NSCharacterSet NSColor NSColorList NSData NSDecimalNumber NSDictionary NSError NSEvent NSFileAttributes NSFileManager NSFileManager enumeratorAtURL NSFont NSFontManager NSGraphicsContext NSImage NSIndex NSKeyedArchiver NSKeyedUnarchiver NSLocale NSMutableArray NSMutableDictionary NSMutableString NSNotFound NSNumber NSOpenPanel NSPasteboard NSpoint NSPredicate NSPrintOperation NSRange NSRect NSRegularExpression NSRunningApplication NSScreen NSSize NSString NSString stringByApplyingTransform NSStringCompareOptions NSTask NSTimeZone NSURL NSURL File NSURLBookmark NSURLComponents NSURLResourceKey NSURLSession NSUserDefaults NSUUID NSView NSWorkspace Numbers OAuth OneDrive PDF PDFAnnotation PDFAnnotationWidget PDFContext PDFDisplayBox PDFDocumentPermissions PDFImageRep PDFKit PDFnUP PDFOutline perl Photoshop PlistBuddy pluginkit postalcode PostScript prefPane Preview Python QuickLook QuickTime ReadMe Regular Expression Reminders ReName Repeat RTF Safari SaveFile ScreenCapture ScreenSaver SF Symbols character id SF Symbols Entity sips Skype Slack Sound Spotlight sqlite SRT StandardAdditions Swift System Settings TCC TemporaryItems Terminal Text Text CSV Text MD Text TSV TextEdit Tools Translate Trash Twitter Typography UI Unit Conversion UTType valueForKeyPath Video VisionKit Visual Studio Code VMware Fusion Wacom webarchive webp Wifi Windows XML XML EPUB XML OPML XML Plist XML RSS XML savedSearch XML SVG XML TTML XML webloc XML XMP YouTube zoom