Acrobat Preferences

[Reader]AdobeIDでログインして利用出来なくする

202411180832331_855x6973
サンプルコード

サンプルソース(参考)
行番号ソース
001#!/bin/bash
002#com.cocolog-nifty.quicktimer.icefloe
003#
004/usr/bin/sudo /bin/mkdir -p "/Library/Application Support/Adobe/Acrobat/DC/Preferences"
005/usr/bin/sudo /bin/mkdir -p "/Library/Application Support/Adobe/Acrobat/2020/Preferences"
006/usr/bin/sudo /bin/mkdir -p "/Library/Application Support/Adobe/Acrobat/Classic/Preferences"
007
008#################################################
009#パス READER
010STR_PLIST_FILE_PATH="/Library/Preferences/com.adobe.Reader.plist"
011#ファイルが無い想定でまずはタッチ
012if [ -e "$STR_PLIST_FILE_PATH" ]; then
013  /usr/bin/sudo /usr/bin/touch "$STR_PLIST_FILE_PATH"
014  /usr/bin/sudo /bin/chmod 644 "$STR_PLIST_FILE_PATH"
015else
016  /usr/bin/sudo /usr/libexec/PlistBuddy -c "Save:" "$STR_PLIST_FILE_PATH"
017  /usr/bin/sudo /bin/chmod 644 "$STR_PLIST_FILE_PATH"
018fi
019#########################
020#DC READER
021if ! /usr/libexec/PlistBuddy -c "Print:DC:FeatureLockdown:cServices:bUpdater" "$STR_PLIST_FILE_PATH"; then
022  /bin/echo "エラー: FeatureLockdown 設定値がありません"
023  /usr/bin/sudo /usr/libexec/PlistBuddy -c "Add:DC dict" "$STR_PLIST_FILE_PATH"
024  /usr/bin/sudo /usr/libexec/PlistBuddy -c "Add:DC:FeatureLockdown dict" "$STR_PLIST_FILE_PATH"
025  /usr/bin/sudo /usr/libexec/PlistBuddy -c "Add:DC:FeatureLockdown:cServices dict" "$STR_PLIST_FILE_PATH"
026  /usr/bin/sudo /usr/libexec/PlistBuddy -c "Add:DC:FeatureLockdown:cServices:bUpdater bool false" "$STR_PLIST_FILE_PATH"
027fi
028/usr/bin/sudo /usr/libexec/PlistBuddy -c "Set:DC:FeatureLockdown:cServices:bUpdater  false" "$STR_PLIST_FILE_PATH"
029/usr/bin/sudo /usr/libexec/PlistBuddy -c "Save" "$STR_PLIST_FILE_PATH"
030/usr/bin/sudo /bin/chmod 644 "$STR_PLIST_FILE_PATH"
031
032#########################
033#2020 READER
034if ! /usr/libexec/PlistBuddy -c "Print:2020:FeatureLockdown:cServices:bUpdater" "$STR_PLIST_FILE_PATH"; then
035  /bin/echo "エラー: FeatureLockdown 設定値がありません"
036  /usr/bin/sudo /usr/libexec/PlistBuddy -c "Add:2020 dict" "$STR_PLIST_FILE_PATH"
037  /usr/bin/sudo /usr/libexec/PlistBuddy -c "Add:2020:FeatureLockdown dict" "$STR_PLIST_FILE_PATH"
038  /usr/bin/sudo /usr/libexec/PlistBuddy -c "Add:2020:FeatureLockdown:cServices dict" "$STR_PLIST_FILE_PATH"
039  /usr/bin/sudo /usr/libexec/PlistBuddy -c "Add:2020:FeatureLockdown:cServices:bUpdater bool false" "$STR_PLIST_FILE_PATH"
040fi
041/usr/bin/sudo /usr/libexec/PlistBuddy -c "Set:2020:FeatureLockdown:cServices:bUpdater  false" "$STR_PLIST_FILE_PATH"
042/usr/bin/sudo /usr/libexec/PlistBuddy -c "Save" "$STR_PLIST_FILE_PATH"
043/usr/bin/sudo /bin/chmod 644 "$STR_PLIST_FILE_PATH"
044
045exit 0
AppleScriptで生成しました

|

Acrobat同期される設定ファイルのクリーニング(同期設定 サーバーとキャッシュ)


AppleScript サンプルコード

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

AppleScript サンプルソース(参考)
行番号ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#
004#
005# com.cocolog-nifty.quicktimer.icefloe
006----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
007##自分環境がos12なので2.8にしているだけです
008use AppleScript version "2.8"
009use framework "Foundation"
010use framework "AppKit"
011use scripting additions
012
013property refMe : a reference to current application
014
015#ディレクトリ
016set appFileManager to refMe's NSFileManager's defaultManager()
017set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSApplicationSupportDirectory) inDomains:(refMe's NSUserDomainMask))
018set ocidApplicatioocidupportDirPathURL to ocidURLsArray's firstObject()
019set ocidUserPrefsDirPathURL to ocidApplicatioocidupportDirPathURL's URLByAppendingPathComponent:("Adobe/Acrobat/DC/Acrobat/PrefSync/Preferences/UserPrefs_Prod") isDirectory:(true)
020#対象のファイル名
021set listFileName to {"CachedJson.txt", "ServerJson.txt"} as list
022#
023repeat with itemFileName in listFileName
024  #読み込んで
025  set strFileName to itemFileName as text
026  set ocidUserPrefsFilePathURL to (ocidUserPrefsDirPathURL's URLByAppendingPathComponent:(itemFileName) isDirectory:(false))
027  #NSDATA
028  set ocidOption to (refMe's NSDataReadingMappedIfSafe)
029  set listResponse to (refMe's NSData's alloc()'s initWithContentsOfURL:(ocidUserPrefsFilePathURL) options:(ocidOption) |error| :(reference))
030  set ocidJsonData to (item 1 of listResponse)
031  #NSString
032  set ocidJsonSring to (refMe's NSString's alloc()'s initWithData:(ocidJsonData) encoding:(refMe's NSUTF8StringEncoding))
033  #置換
034  set ocidJsonSring to (ocidJsonSring's stringByReplacingOccurrencesOfString:("?") withString:(""))
035  #上書き保存
036  set listDone to (ocidJsonSring's writeToURL:(ocidUserPrefsFilePathURL) atomically:(true) encoding:(refMe's NSUTF8StringEncoding) |error| :(reference))
037  
038  
039end repeat
040
041
042
043
AppleScriptで生成しました

|

[Acrobat] SDIMode( Single Document Interface) 判定


サンプルコード

サンプルソース(参考)
行番号ソース
001#Check SDIMode
002set strCommandText to ("/usr/libexec/PlistBuddy -c \"Print:DC:AVGeneral:SDIMode:1\" \"$HOME/Library/Preferences/com.adobe.Acrobat.Pro.plist\"") as text
003log strCommandText
004try
005  #PlistBuddy command exec
006  set strBoolValue to (do shell script strCommandText) as text
007  --Command No error
008  log "Av2 New Acrobat UI version (may be after acrobat v22)"
009  if strBoolValue is "false" then
010    log "Windows With TAB, No Single Document Interface"
011    --bring to front not work
012  else if strBoolValue is "true" then
013    log "Windows NO TAB ,Single Document Interface"
014    -- bring to front is work
015  end if
016on error
017  log "No Av2 New Acrobat UI version (may be before acrobat v21)"
018  -- bring to front is work
019end try
AppleScriptで生成しました

|

[Acrobat]ファイルストレージ内のマイコンピューターに表示されるフォルダのリセット


AppleScript サンプルコード

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

AppleScript サンプルソース(参考)
行番号ソース
001#! /usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#
004#com.cocolog-nifty.quicktimer.icefloe
005----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
006use AppleScript version "2.8"
007use framework "Foundation"
008use framework "AppKit"
009use scripting additions
010property refMe : a reference to current application
011property refNotFound : a reference to 9.22337203685477E+18 + 5807
012
013
014
015##########################################
016#
017set listBundleID to {"com.adobe.Acrobat.Pro", "com.adobe.Reader"} as list
018
019##########################################
020#アプリケーションを終了させる
021log doQuitApp()
022
023##########################################
024###Plistへのパス
025set appFileManager to refMe's NSFileManager's defaultManager()
026set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSLibraryDirectory) inDomains:(refMe's NSUserDomainMask))
027set ocidLibraryDirPathURL to ocidURLsArray's firstObject()
028###ReaderとPro両方処理する
029repeat with itemBundleID in listBundleID
030  ##########################################
031  ###【1】PLISTのパス
032  set strSubPath to ("Preferences/" & itemBundleID) as text
033  set ocidBaseFilePathURL to (ocidLibraryDirPathURL's URLByAppendingPathComponent:(strSubPath) isDirectory:(false))
034  set ocidPlistFilePathURL to (ocidBaseFilePathURL's URLByAppendingPathExtension:("plist"))
035  
036  ##########################################
037  ### 【2】PLISTを可変レコードとして読み込み
038  set ocidPlistDict to (refMe's NSMutableDictionary's alloc()'s initWithContentsOfURL:(ocidPlistFilePathURL))
039  ##########################################
040  ### 【3】処理
041  set ocidDCDict to (ocidPlistDict's objectForKey:("DC"))
042  ############
043  #旧UI 用
044  set ocidGeneralDict to (ocidDCDict's objectForKey:("General"))
045  #現在の設定
046  set ocidRecentFoldersArray to (ocidGeneralDict's objectForKey:("RecentFolders"))
047    if ocidRecentFoldersArray ≠ (missing value) then
048  log (ocidRecentFoldersArray's objectAtIndex:0) as integer
049  #値の変更
050  set ocidSetValue to (refMe's NSNumber's numberWithInteger:(0))
051  (ocidRecentFoldersArray's replaceObjectAtIndex:(0) withObject:(ocidSetValue))
052  #変更後の値
053  set ocidRecentFoldersArray to (ocidGeneralDict's objectForKey:("RecentFolders"))
054  log (ocidRecentFoldersArray's objectAtIndex:0) as integer
055    else if ocidRecentFoldersArray = (missing value) then
056    #設定値が空
057  end if
058  ############
059  #AV2新UI用
060  set ocidAV2GeneralDict to (ocidDCDict's objectForKey:("AVGeneral"))
061  #現在の設定
062  set ocidAV2RecentFoldersArray to (ocidAV2GeneralDict's objectForKey:("RecentFolders"))
063  if ocidAV2RecentFoldersArray ≠ (missing value) then
064    log (ocidAV2RecentFoldersArray's objectAtIndex:0) as integer
065    #値の変更
066    set ocidSetValue to (refMe's NSNumber's numberWithInteger:(0))
067    (ocidAV2RecentFoldersArray's replaceObjectAtIndex:(0) withObject:(ocidSetValue))
068    #変更後の値
069    set ocidAV2RecentFoldersArray to (ocidAV2GeneralDict's objectForKey:("RecentFolders"))
070    log (ocidAV2RecentFoldersArray's objectAtIndex:0) as integer
071  else if ocidAV2RecentFoldersArray = (missing value) then
072    #設定値が空
073  end if
074  
075  ##########################################
076  ####【4】保存 ここは上書き
077  set boolDone to (ocidPlistDict's writeToURL:(ocidPlistFilePathURL) atomically:true)
078  log boolDone
079  if boolDone = true then
080    log "正常終了"
081  else
082    return "保存に失敗しました"
083  end if
084  #
085end repeat
086
087
088##########################################
089####アプリケーションを終了させる
090
091to doQuitApp()
092  
093  set listBundleID to {"com.Adobe.Installers.AdobeLogCollectorTool", "com.Adobe.UnifiedPluginInstallerAgent", "com.adobe.ACCC.Uninstaller", "com.adobe.ARMDC", "com.adobe.ARMDCHelper", "com.adobe.AcroLicApp", "com.adobe.Acrobat.NativeMessagingHost", "com.adobe.Acrobat.Pro", "com.adobe.Acrobat.Uninstaller", "com.adobe.AdobeAcroCEF", "com.adobe.AdobeAcroCEFHelper", "com.adobe.AdobeAcroCEFHelperGPU", "com.adobe.AdobeAcroCEFHelperRenderer", "com.adobe.AdobeAcroRdrCEFHelperGPU", "com.adobe.AdobeAcroRdrCEFHelperRenderer", "com.adobe.AdobeApplicationUpdater", "com.adobe.AdobeCRDaemon", "com.adobe.AdobeIPCBroker", "com.adobe.AdobeRNAWebInstaller", "com.adobe.AdobeRdrCEF", "com.adobe.AdobeRdrCEFHelper", "com.adobe.AdobeRdrCEFHelperGPU", "com.adobe.AdobeRdrCEFHelperRenderer", "com.adobe.AdobeResourceSynchronizer", "com.adobe.Automator.Save-as-Adobe-PDF", "com.adobe.CCLibrary", "com.adobe.CCXProcess", "com.adobe.Creative-Cloud-Desktop-App", "com.adobe.HDInstall", "com.adobe.HDUninstaller", "com.adobe.ImporterREDServer.application", "com.adobe.Install", "com.adobe.LogTransport.LogTransport", "com.adobe.Reader", "com.adobe.Reader.helper", "com.adobe.acc.AdobeCreativeCloud", "com.adobe.acc.AdobeDesktopService", "com.adobe.acc.CCDContainer", "com.adobe.acc.HEXHelper", "com.adobe.acc.HEXHelper.GPU", "com.adobe.acc.HEXHelper.Renderer", "com.adobe.acc.installer.v2", "com.adobe.accmac", "com.adobe.accmac.ACCFinderSync", "com.adobe.acrobat.assert", "com.adobe.adobe_licutil", "com.adobe.bridge14", "com.adobe.cc.Adobe-Creative-Cloud-Diagnostics", "com.adobe.ccd.helper", "com.adobe.ccd.troubleshooter", "com.adobe.cep.CEPHtmlEngine", "com.adobe.cep.CEPHtmlEngine Helper", "com.adobe.cep.CEPHtmlEngine Helper (GPU)", "com.adobe.cep.CEPHtmlEngine Helper (Plugin)", "com.adobe.cep.CEPHtmlEngine Helper (Renderer)", "com.adobe.crashreporter", "com.adobe.distiller", "com.adobe.dynamiclinkmanager.application", "com.adobe.dynamiclinkmediaserver.application", "com.adobe.headlights.HLCrashProcessorApp", "com.adobe.headlights.LogTransport2App", "com.adobe.ngl.p7helper", "com.adobe.photodownloader", "com.apple.appkit.xpc.openAndSavePanelService"} as list
094  
095  
096  repeat with itemBundleID in listBundleID
097    set strBundleID to itemBundleID as text
098    try
099      set ocidResultsArray to (refMe's NSRunningApplication's runningApplicationsWithBundleIdentifier:(strBundleID))
100      set numCntArray to ocidResultsArray count
101      set ocidRunApp to (ocidResultsArray's objectAtIndex:0)
102      ###通常終了
103      set boolDone to ocidRunApp's terminate()
104      ####強制終了
105      set boolDone to ocidRunApp's forceTerminate()
106    end try
107  end repeat
108  
109  
110end doQuitApp
AppleScriptで生成しました

|

[bash]ファイルストレージ内のマイコンピューターに表示されるフォルダのリセット(Acrobat Reader従来版)

20240625114437_1484x770
この部分に表示される項目をリセットします。

サンプルコード

サンプルソース(参考)
行番号ソース
001#!/bin/bash
002#com.cocolog-nifty.quicktimer.icefloe
003# Acrobat Reader 従来版専用
004#################################################
005#STAT
006STAT_USR=$(/usr/bin/stat -f%Su /dev/console)
007/bin/echo "STAT_USR(console): $STAT_USR"
008
009#【前提条件】まずはAcrobatを終了させてください
010#【1】現在の設定の値を確認する
011#旧UI
012/usr/libexec/PlistBuddy -c "Print:DC:General:RecentFolders:0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Reader.plist"
013#-->たぶん8が戻ります
014
015#AV2新UI
016/usr/libexec/PlistBuddy -c "Print:DC:AVGeneral:RecentFolders:0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Reader.plist"
017#-->たぶん8が戻ります
018
019
020
021#【2】設定を変更する
022#旧UI
023/usr/libexec/PlistBuddy -c "Set:DC:General:RecentFolders:0  0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Reader.plist"
024
025#AV2新UI
026/usr/libexec/PlistBuddy -c "Set:DC:AVGeneral:RecentFolders:0  0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Reader.plist"
027
028#【3】変更内容を保存する
029#旧UI AV2新UI 共通1回実施でOK
030/usr/libexec/PlistBuddy -c "Save" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Reader.plist"
031
032
033
034#【4】変更内容を確認す
035#旧UI
036/usr/libexec/PlistBuddy -c "Print:DC:General:RecentFolders:0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Reader.plist"
037
038#AV2新UI
039/usr/libexec/PlistBuddy -c "Print:DC:AVGeneral:RecentFolders:0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Reader.plist"
040
041#-->0が戻ればOK アクロバットを起動してみてください
042
043
044
045
046
047
048exit 0
AppleScriptで生成しました

|

[bash]ファイルストレージ内のマイコンピューターに表示されるフォルダのリセット(Acrobat SCA版のAcrobat Reade 共通)

20240625114437_1484x770
この部分に表示される項目をリセットします。

サンプルコード

サンプルソース(参考)
行番号ソース
001#!/bin/bash
002#com.cocolog-nifty.quicktimer.icefloe
003# Acrobat SCA版のAcrobat Reade 共通
004#################################################
005#STAT
006STAT_USR=$(/usr/bin/stat -f%Su /dev/console)
007/bin/echo "STAT_USR(console): $STAT_USR"
008
009#【前提条件】まずはAcrobatを終了させてください
010#【1】現在の設定の値を確認する
011#旧UI
012/usr/libexec/PlistBuddy -c "Print:DC:General:RecentFolders:0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Acrobat.Pro.plist"
013#-->たぶん8が戻ります
014
015#AV2新UI
016/usr/libexec/PlistBuddy -c "Print:DC:AVGeneral:RecentFolders:0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Acrobat.Pro.plist"
017#-->たぶん8が戻ります
018
019
020
021#【2】設定を変更する
022#旧UI
023/usr/libexec/PlistBuddy -c "Set:DC:General:RecentFolders:0  0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Acrobat.Pro.plist"
024
025#AV2新UI
026/usr/libexec/PlistBuddy -c "Set:DC:AVGeneral:RecentFolders:0  0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Acrobat.Pro.plist"
027
028#【3】変更内容を保存する
029#旧UI AV2新UI 共通1回実施でOK
030/usr/libexec/PlistBuddy -c "Save" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Acrobat.Pro.plist"
031
032
033
034#【4】変更内容を確認す
035#旧UI
036/usr/libexec/PlistBuddy -c "Print:DC:General:RecentFolders:0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Acrobat.Pro.plist"
037
038#AV2新UI
039/usr/libexec/PlistBuddy -c "Print:DC:AVGeneral:RecentFolders:0" "/Users/${STAT_USR}/Library/Preferences/com.adobe.Acrobat.Pro.plist"
040
041#-->0が戻ればOK アクロバットを起動してみてください
042
043
044
045
046
047
048exit 0
AppleScriptで生成しました

|

その他のカテゴリー

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 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