Wacom

[Driver]ログイン時に開く にWACOMのドライバーを登録する

こうなります
Screen-20231024-154705

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

#!/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 scripting additions
property refMe : a reference to current application

####アプリケーションフォルダ
set appFileManager to refMe's NSFileManager's defaultManager()
set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSApplicationDirectory) inDomains:(refMe's NSLocalDomainMask))
set ocidApplicationDirPathURL to ocidURLsArray's firstObject()
####
set ocidTabletDriverURL to ocidApplicationDirPathURL's URLByAppendingPathComponent:("Wacom Tablet.localized/.Tablet/TabletDriver.app")
set ocidWacomTabletDriverURL to ocidApplicationDirPathURL's URLByAppendingPathComponent:("Wacom Tablet.localized/.Tablet/WacomTabletDriver.app")
set ocidWacomTouchDriverURL to ocidApplicationDirPathURL's URLByAppendingPathComponent:("Wacom Tablet.localized/.Tablet/WacomTouchDriver.app")
####
set appFileManager to refMe's NSFileManager's defaultManager()
set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSLibraryDirectory) inDomains:(refMe's NSLocalDomainMask))
set ocidLibraryDirPathURL to ocidURLsArray's firstObject()
set ocidIOManagerURL to ocidLibraryDirPathURL's URLByAppendingPathComponent:("PrivilegedHelperTools/com.wacom.IOManager.app")
###
try
  set strTabletDriverURL to (ocidTabletDriverURL's |path|()) as text
  set strWacomTabletDriverURL to (ocidWacomTabletDriverURL's |path|()) as text
  set strWacomTouchDriverURL to (ocidWacomTouchDriverURL's |path|()) as text
  set strIOManagerURL to (ocidIOManagerURL's |path|()) as text
on error
return "WACOMのドライバーが正しくインストールされていません"
end try

tell application "System Events"
  make login item at end with properties {name:"TabletDriver.app", path:strTabletDriverURL, class:login item, kind:"アプリケーション", hidden:true}
end tell

tell application "System Events"
  make login item at end with properties {name:"WacomTabletDriver.app", path:strWacomTabletDriverURL, class:login item, kind:"アプリケーション", hidden:true}
end tell


tell application "System Events"
  make login item at end with properties {name:"WacomTouchDriver.app", path:strWacomTouchDriverURL, class:login item, kind:"アプリケーション", hidden:true}
end tell

tell application "System Events"
  make login item at end with properties {name:"com.wacom.IOManager.app", path:strIOManagerURL, class:login item, kind:"アプリケーション", hidden:true}
end tell


|

[wacom]起動項目

アプリケーションに書き出して 起動項目に

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

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

##タッチドライバ用
set listUTI to {"com.wacom.WacomCenter", "com.wacom.wacomtablet", "com.wacom.IOManager", "com.wacom.WacomTouchDriver"} as list
##タブレットドライバ用
set listUTI to {"com.wacom.WacomCenter", "com.wacom.wacomtablet", "com.wacom.IOManager", "com.wacom.TabletDriver"} as list

repeat with itemUTI in listUTI
  tell application id itemUTI
    launch
  end tell
end repeat
###起動


###隠す処理
tell application "System Events"
  tell application process "Wacom Center"
    set visible to false
  end tell
end tell





|

[wacom]関連プロセス終了


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

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
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 listUTI to {"com.wacom.TabletDriver", "com.wacom.DataStoreMgr", "com.wacom.FirmwareUpdater", "com.wacom.IOManager", "com.wacom.MultiTouch", "com.wacom.ProfessionalControlPanel", "com.wacom.RemoveTabletHelper", "com.wacom.RemoveWacomTablet", "com.wacom.TabletDriver", "com.wacom.TabletHelper", "com.wacom.UpdateHelper", "com.wacom.UpgradeHelper", "com.wacom.Wacom-Desktop-Center", "com.wacom.Wacom-Display-Settings", "com.wacom.WacomCenter", "com.wacom.WacomCenterPrefPane", "com.wacom.WacomExperienceProgram", "com.wacom.WacomTabletDriver", "com.wacom.WacomTouchDriver", "com.wacom.displayhelper", "com.wacom.wacomtablet", "com.wacom.DisplayMgr"} as list

repeat with itemUTI in listUTI
  ###NSRunningApplication
  set ocidRunningApplication to refMe's NSRunningApplication
  ###起動中のすべてのリスト
  set ocidAppArray to (ocidRunningApplication's runningApplicationsWithBundleIdentifier:(itemUTI))
  ###複数起動時も順番に終了
  repeat with itemAppArray in ocidAppArray
itemAppArray's terminate()
  end repeat
end repeat
log "通常終了"
delay 3

repeat with itemUTI in listUTI
  ###NSRunningApplication
  set ocidRunningApplication to refMe's NSRunningApplication
  ###起動中のすべてのリスト
  set ocidAppArray to (ocidRunningApplication's runningApplicationsWithBundleIdentifier:(itemUTI))
  ###複数起動時も順番に終了
  repeat with itemAppArray in ocidAppArray
itemAppArray's forceTerminate()
  end repeat
end repeat

log "強制終了"




|

[Wacom]ドライバー削除 BASH


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

#!/bin/bash

########################################
###管理者インストールしているか?チェック
USER_WHOAMI=$(/usr/bin/whoami)
/bin/echo "実行したユーザーは:$USER_WHOAMI"
NUM_UID=$(/usr/bin/id -u)
/bin/echo "実行ユーザーIDは:" "$NUM_UID"
if [ "$USER_WHOAMI" != "root" ]; then
  /bin/echo "このスクリプトを実行するには管理者権限が必要です。"
  /usr/bin/printf "sudo で実行してください\n\n"
  ### path to me
  SCRIPT_PATH="${BASH_SOURCE[0]}"
  /bin/echo "/usr/bin/sudo \"$SCRIPT_PATH\""
  /usr/bin/printf "\n ↑ を実行してください\n\n"
  exit 1
else
  ###実行しているユーザー名
  SUDO_USER=$(/bin/echo "$HOME" | /usr/bin/awk -F'/' '{print $NF}')
  /bin/echo "実行ユーザー:" "$SUDO_USER"
  NUM_UID=$(/usr/bin/sudo -u "$SUDO_USER" /usr/bin/id -u)
  /bin/echo "実行ユーザーIDは:" "$NUM_UID"
fi

################################################################
/usr/sbin/spctl --master-disable

/usr/bin/killall "WacomTouchDriver"
/usr/bin/killall "WacomTabletDriver"
/usr/bin/killall "Wacom Desktop Center"
/usr/bin/killall "TabletDriver"
/usr/bin/killall "com.wacom.DataStoreMgr"
/usr/bin/killall "com.wacom.IOManager"
/usr/bin/killall "com.wacom.UpdateHelper"

LIST_UTI=("com.wacom.DataStoreMgr" "com.wacom.FirmwareUpdater" "com.wacom.IOManager" "com.wacom.MultiTouch" "com.wacom.ProfessionalControlPanel" "com.wacom.RemoveTabletHelper" "com.wacom.RemoveWacomTablet" "com.wacom.TabletDriver" "com.wacom.TabletHelper" "com.wacom.UpdateHelper" "com.wacom.UpgradeHelper" "com.wacom.Wacom-Desktop-Center" "com.wacom.Wacom-Display-Settings" "com.wacom.WacomCenter" "com.wacom.WacomCenterPrefPane" "com.wacom.WacomExperienceProgram" "com.wacom.WacomTabletDriver" "com.wacom.WacomTouchDriver" "com.wacom.displayhelper" "com.wacom.wacomtablet" "com.wacom.DisplayMgr")

for ITEM_UTI in "${LIST_UTI[@]}"; do
  /bin/echo "$ITEM_UTI"
  STR_FILE_PATH="/Library/LaunchDaemons/$ITEM_UTI.plist"
  if [ -f "$STR_FILE_PATH" ]; then
    /bin/launchctl stop -w "$STR_FILE_PATH"
    /bin/launchctl unload -w "$STR_FILE_PATH"
    /bin/launchctl bootout -w "$STR_FILE_PATH"
    /bin/rm "$STR_FILE_PATH"
  fi
  STR_FILE_PATH="/Library/LaunchAgents/$ITEM_UTI.plist"
  if [ -f "$STR_FILE_PATH" ]; then
    /bin/launchctl stop -w "$STR_FILE_PATH"
    /bin/launchctl unload -w "$STR_FILE_PATH"
    /bin/launchctl bootout -w "$STR_FILE_PATH"
    /bin/rm "$STR_FILE_PATH"
  fi
done

################################################################
/bin/mkdir -p /var/folders/TemporaryItems
/bin/chmod -Rf 777 /var/folders/TemporaryItems

/sbin/kextunload -b "Wacom Tablet"
/sbin/kextunload -b "Pen Tablet"
/sbin/kextunload -b "SiLabsUSBDriver"
/sbin/kextunload -b "SiLabsUSBDriver64"

################################################################
#####古いファイルをゴミ箱に LOCAL
function DO_MOVE_TO_TRASH() {
  if [ -e "$1" ]; then
    TRASH_DIR=$(/usr/bin/mktemp -d "/var/folders/TemporaryItems/XXXXXXXX")
    /bin/chmod 777 "$TRASH_DIR"
    /bin/mv "$1" "$TRASH_DIR"
    ##削除
    /usr/bin/find "$TRASH_DIR" -mindepth 1 -delete
  fi
}
#####古いファイルをゴミ箱に LOCAL
DO_MOVE_TO_TRASH "/Applications/Wacom Tablet.localized"

DO_MOVE_TO_TRASH "/Library/Application Support/Tablet"
DO_MOVE_TO_TRASH "/Library/Application Support/Wacom"

DO_MOVE_TO_TRASH "/Library/Extensions/Wacom Tablet.kex"
DO_MOVE_TO_TRASH "/Library/Extensions/Pen Tablet.kext"

DO_MOVE_TO_TRASH "/Library/Frameworks/WacomMultiTouch.framework"

DO_MOVE_TO_TRASH "/Library/Internet Plug-Ins/WacomNetscape.plugin"
DO_MOVE_TO_TRASH "/Library/Internet Plug-Ins/WacomSafari.plugin"
DO_MOVE_TO_TRASH "/Library/Internet Plug-Ins/WacomTabletPlugin.plugin"

DO_MOVE_TO_TRASH "/Library/PreferencePanes/WacomTablet.prefpane"
DO_MOVE_TO_TRASH "/Library/PreferencePanes/WacomCenter.prefpane"
DO_MOVE_TO_TRASH "/Library/PreferencePanes/PenTablet.prefpane"

DO_MOVE_TO_TRASH "/Library/Preferences/Tablet"

DO_MOVE_TO_TRASH "/Library/StartupItems/Tablet"

DO_MOVE_TO_TRASH "/Library/Receipts/InstallConsumerTablet.pkg"
DO_MOVE_TO_TRASH "/Library/Receipts/InstallProTablet.pkg"
DO_MOVE_TO_TRASH "/Library/Receipts/InstallSemiproTablet.pkg"

DO_MOVE_TO_TRASH "/Library/PrivilegedHelperTools/com.wacom.DataStoreMgr.app"
DO_MOVE_TO_TRASH "/Library/PrivilegedHelperTools/com.wacom.IOManager.app"
DO_MOVE_TO_TRASH "/Library/PrivilegedHelperTools/com.wacom.UpdateHelper.app"

###USBドライバーは他で使ってないか?確認が必要かな
DO_MOVE_TO_TRASH "/Library/Extensions/SiLabsUSBDriver.kext"
DO_MOVE_TO_TRASH "/Library/Extensions/SiLabsUSBDriver64.kext"


for ITEM_UTI in "${LIST_UTI[@]}"; do
  /bin/echo "処理するUTI:" "$ITEM_UTI"
  STR_FILE_PATH="/Library/PrivilegedHelperTools/$ITEM_UTI.app"
  DO_MOVE_TO_TRASH "$STR_FILE_PATH"
  STR_FILE_PATH="/Library/Preferences/$ITEM_UTI.plist"
  DO_MOVE_TO_TRASH "$STR_FILE_PATH"
done

############################################################
###ローカルのユーザーアカウントを取得
TEXT_RESULT=$(/usr/bin/dscl localhost -list /Local/Default/Users PrimaryGroupID | /usr/bin/awk '$2 == 20 { print $1 }')
###リストにする
read -d '\\n' -r -a LIST_USER <<<"$TEXT_RESULT"
###リスト内の項目数
NUM_CNT=${#LIST_USER[@]}
/bin/echo "ユーザー数:" "$NUM_CNT"
############################################################
##リストの内容を順番に処理
for ITEM_USER in "${LIST_USER[@]}"; do
  /bin/echo "ITEM_USER:MKDIR:" "ITEM_USER"
  ##ライブラリの不可視属性を解除
  /usr/bin/sudo -u "$ITEM_USER" /usr/bin/chflags nohidden "/Users/$ITEM_USER/Library"
  /usr/bin/sudo -u "$ITEM_USER" /usr/bin/SetFile -a v "/Users/$ITEM_USER/Library"
  ##ユーザーアプリケーションフォルダを作る
  /usr/bin/sudo -u "$ITEM_USER" /bin/mkdir -p "/Users/$ITEM_USER/Applications"
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 700 "/Users/$ITEM_USER/Applications"
  /usr/bin/sudo -u "$ITEM_USER" /usr/sbin/chown "$ITEM_USER" "/Users/$ITEM_USER/Applications"
  /usr/bin/sudo -u "$ITEM_USER" /usr/bin/touch "/Users/$ITEM_USER/Applications/.localized"
  ##ユーザーユーティリティフォルダを作る
  /usr/bin/sudo -u "$ITEM_USER" /bin/mkdir -p "/Users/$ITEM_USER/Applications/Utilities"
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 755 "/Users/$ITEM_USER/Applications/Utilities"
  /usr/bin/sudo -u "$ITEM_USER" /usr/sbin/chown "$ITEM_USER" "/Users/$ITEM_USER/Applications/Utilities"
  /usr/bin/sudo -u "$ITEM_USER" /usr/bin/touch "/Users/$ITEM_USER/Applications/Utilities/.localized"
  ## Managed Itemsフォルダを作る
  /usr/bin/sudo -u "$ITEM_USER" /bin/mkdir -p "/Users/$ITEM_USER/Library/Managed Items"
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 755 "/Users/$ITEM_USER/Library/Managed Items"
  /usr/bin/sudo -u "$ITEM_USER" /usr/sbin/chown "$ITEM_USER" "/Users/$ITEM_USER/Library/Managed Items"
  /usr/bin/sudo -u "$ITEM_USER" /usr/bin/touch "/Users/$ITEM_USER/Library/Managed Items/.localized"
  ##アクセス権チェック
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 700 "/Users/$ITEM_USER/Library"
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 777 "/Users/$ITEM_USER/Library/Caches"
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 700 "/Users/$ITEM_USER/Movies"
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 700 "/Users/$ITEM_USER/Music"
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 700 "/Users/$ITEM_USER/Pictures"
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 700 "/Users/$ITEM_USER/Downloads"
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 700 "/Users/$ITEM_USER/Documents"
  /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 700 "/Users/$ITEM_USER/Desktop"
  ##全ローカルユーザーに対して実施したい処理があれば追加する

  /bin/echo "ユーザーディレクトリチェックDONE"
done
############################################################
##ユーザーエージェント停止
for ITEM_USER in "${LIST_USER[@]}"; do
  /bin/echo "ITEM_USER:MKDIR:" "$ITEM_USER"
  for ITEM_UTI in "${LIST_UTI[@]}"; do
    STR_FILE_PATH="/Users/$ITEM_USER/Library/LaunchAgents/$ITEM_UTI.plist"
    if [ -f "$STR_FILE_PATH" ]; then
      /usr/bin/sudo -u "$ITEM_USER" /bin/launchctl stop -w "$STR_FILE_PATH"
      /usr/bin/sudo -u "$ITEM_USER" /bin/launchctl unload -w "$STR_FILE_PATH"
      /usr/bin/sudo -u "$ITEM_USER" /bin/launchctl bootout -w "$STR_FILE_PATH"
      /usr/bin/sudo -u "$ITEM_USER" /bin/rm "$STR_FILE_PATH"
    fi
  done
done
############################################################
##ユーザー環境リセット
for ITEM_USER in "${LIST_USER[@]}"; do
  /bin/echo "ITEM_USER:ユーザー環境削除:" "$ITEM_USER"
  function DO_MOVE_TO_TRASH_USER() {
    if [ -e "$1" ]; then
      TRASH_DIR=$(/usr/bin/sudo -u "$ITEM_USER" /usr/bin/mktemp -d)
      /usr/bin/sudo -u "$ITEM_USER" /bin/chmod 777 "$TRASH_DIR"
      /usr/bin/sudo -u "$ITEM_USER" /bin/mv "$1" "$TRASH_DIR"
      ##削除
      /usr/bin/sudo -u "$ITEM_USER" /usr/bin/find "$TRASH_DIR" -mindepth 1 -delete
    fi
}
  for ITEM_UTI in "${LIST_UTI[@]}"; do
    DO_MOVE_TO_TRASH_USER "/Users/$ITEM_USER/Library/Application Scripts/EG27766DY7.$ITEM_UTI"
    DO_MOVE_TO_TRASH_USER "/Users/$ITEM_USER/Library/Application Scripts/$ITEM_UTI"
    DO_MOVE_TO_TRASH_USER "/Users/$ITEM_USER/Library/Caches/$ITEM_UTI"
    DO_MOVE_TO_TRASH_USER "/Users/$ITEM_USER/Library/WebKit/$ITEM_UTI"
    DO_MOVE_TO_TRASH_USER "/Users/$ITEM_USER/Library/Saved Application State/$ITEM_UTI.savedState"
    DO_MOVE_TO_TRASH_USER "/Users/$ITEM_USER/Library/HTTPStorages/$ITEM_UTI"
    DO_MOVE_TO_TRASH_USER "/Users/$ITEM_USER/Library/Containers/$ITEM_UTI"

    DO_MOVE_TO_TRASH_USER "/Users/$ITEM_USER/Library/Group Containers/group.EG27766DY7.$ITEM_UTI"
    DO_MOVE_TO_TRASH_USER "/Users/$ITEM_USER/Library/Group Containers/EG27766DY7.$ITEM_UTI"
    DO_MOVE_TO_TRASH_USER "/Users/$ITEM_USER/Library/Group Containers/$ITEM_UTI"
  done

done

############################################################
## TCCリセット
for ITEM_USER in "${LIST_USER[@]}"; do
  /bin/echo "ITEM_USER:TCCリセット:" "$ITEM_USER"
  for ITEM_UTI in "${LIST_UTI[@]}"; do
    /usr/bin/sudo -u "$ITEM_USER" /usr/bin/tccutil reset "$ITEM_UTI"
  done
done
exit 0


|

[Wacom]ドライバー関連(設定も)全部削除

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

property refMe : a reference to current application
property refNSString : a reference to refMe's NSString
property refNSURL : a reference to refMe's NSURL

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


try
set strGoToTrashPath to "/Applications/Wacom Tablet.localized" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
tell application "Finder" to activate
try
set strGoToTrashPath to "/Library/Application Support/Tablet" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/PrivilegedHelperTools/com.wacom.DataStoreMgr.app" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/PrivilegedHelperTools/com.wacom.IOManager.app" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/PrivilegedHelperTools/com.wacom.UpdateHelper.app" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/Preferences/Tablet" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/PreferencePanes/WacomCenter.prefpane" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/PreferencePanes/WacomTablet.prefpane" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/PreferencePanes/PenTablet.prefpane" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/Frameworks/WacomMultiTouch.framework" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/Internet Plug-Ins/WacomTabletPlugin.plugin" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/Internet Plug-Ins/WacomSafari.plugin" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strGoToTrashPath to "/Library/Internet Plug-Ins/WacomNetscape.plugin" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try

#################################
#####temporaryDirectory
set ocidTemporaryDirUrl to objFileManager's temporaryDirectory()
set ocidTemporaryDirUserUrl to ocidTemporaryDirUrl's URLByDeletingLastPathComponent()
log ocidTemporaryDirUserUrl as text
log className() of ocidTemporaryDirUserUrl as text
set ocidTemporaryDirURLC to ocidTemporaryDirUserUrl's URLByAppendingPathComponent:"C"
set ocidTemporaryDirURLT to ocidTemporaryDirUserUrl's URLByAppendingPathComponent:"T"
#################################
#####Library
set ocidUserLibraryPathArray to (objFileManager's URLsForDirectory:(refMe's NSLibraryDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidUserLibraryPath to item 1 of ocidUserLibraryPathArray
set ocidLibraryDirURLAs to ocidUserLibraryPath's URLByAppendingPathComponent:"Application Scripts"
set ocidLibraryDirURLCont to ocidUserLibraryPath's URLByAppendingPathComponent:"Containers"
set ocidLibraryDirURLGs to ocidUserLibraryPath's URLByAppendingPathComponent:"Group Containers"
set ocidLibraryDirURLLa to ocidUserLibraryPath's URLByAppendingPathComponent:"LaunchAgents"


set listPlist to {"com.wacom.Wacom-Display-Settings.plist", "com.wacom.Wacom-Desktop-Center.plist", "com.wacom.wacomtablet.plist", "com.wacom.IOManager.plist", "com.wacom.DataStoreMgr.plist", "com.wacom.UpdateHelper.plist", "com.wacom.displayhelper.plist", "com.wacom.wacomtablet.plist", "com.wacom.RemoveTabletHelper.plist", "com.wacom.TabletHelper.plist", "com.wacom.UpdateHelper.plist"}

repeat with itemPlist in listPlist
set ocidGoToTrashPathURL to (ocidLibraryDirURLLa's URLByAppendingPathComponent:itemPlist)
####ゴミ箱に入れる
set listDoneGoToTrash to (objFileManager's trashItemAtURL:ocidGoToTrashPathURL resultingItemURL:(missing value) |error|:(reference))
log item 1 of listDoneGoToTrash
log item 2 of listDoneGoToTrash
try
set strCommandText to ("/usr/bin/sudo /bin/launchctl unload /Library/LaunchDaemons/" & itemPlist & "") as text
do shell script strCommandText with administrator privileges
end try
try
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"/Library/LaunchDaemons/" & itemPlist & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strCommandText to ("/usr/bin/sudo /bin/launchctl unload /Library/LaunchAgents/" & itemPlist & "") as text
do shell script strCommandText with administrator privileges
end try
try
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"/Library/LaunchAgents/" & itemPlist & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set strCommandText to ("/bin/launchctl unload $HOME/Library/LaunchAgents/" & itemPlist & "") as text
do shell script strCommandText with administrator privileges
end try
end repeat



set listUTI to {"com.wacom.DataStoreMgr", "com.wacom.IOManager", "com.wacom.RemoveWacomTablet", "com.wacom.TabletDriver", "com.wacom.UpgradeHelper", "com.wacom.WacomCenter ", "com.wacom.WacomExperienceProgram", "com.wacom.wacomtablet", "com.wacom.WacomTouchDriver", "EG27766DY7.com.wacom.WacomTabletDriver", "group.com.wacom.TabletDriver", "group.EG27766DY7.com.wacom.WacomTabletDriver", "com.wacom.WacomCenter"} as list


repeat with itemUTI in listUTI


set ocidGoToTrashPathURL to (ocidTemporaryDirURLC's URLByAppendingPathComponent:itemUTI)
####ゴミ箱に入れる
set listDoneGoToTrash to (objFileManager's trashItemAtURL:ocidGoToTrashPathURL resultingItemURL:(missing value) |error|:(reference))
log item 1 of listDoneGoToTrash
log item 2 of listDoneGoToTrash

set ocidGoToTrashPathURL to (ocidTemporaryDirURLT's URLByAppendingPathComponent:itemUTI)
####ゴミ箱に入れる
set listDoneGoToTrash to (objFileManager's trashItemAtURL:ocidGoToTrashPathURL resultingItemURL:(missing value) |error|:(reference))
log item 1 of listDoneGoToTrash
log item 2 of listDoneGoToTrash

set ocidGoToTrashPathURL to (ocidLibraryDirURLAs's URLByAppendingPathComponent:itemUTI)
####ゴミ箱に入れる
set listDoneGoToTrash to (objFileManager's trashItemAtURL:ocidGoToTrashPathURL resultingItemURL:(missing value) |error|:(reference))
log item 1 of listDoneGoToTrash
log item 2 of listDoneGoToTrash


set ocidGoToTrashPathURL to (ocidLibraryDirURLCont's URLByAppendingPathComponent:itemUTI)
####ゴミ箱に入れる
set listDoneGoToTrash to (objFileManager's trashItemAtURL:ocidGoToTrashPathURL resultingItemURL:(missing value) |error|:(reference))
log item 1 of listDoneGoToTrash
log item 2 of listDoneGoToTrash

set ocidGoToTrashPathURL to (ocidLibraryDirURLGs's URLByAppendingPathComponent:itemUTI)
####ゴミ箱に入れる
set listDoneGoToTrash to (objFileManager's trashItemAtURL:ocidGoToTrashPathURL resultingItemURL:(missing value) |error|:(reference))
log item 1 of listDoneGoToTrash
log item 2 of listDoneGoToTrash

end repeat

try
set theComand to ("/usr/bin/sudo /sbin/kextunload -b SiLabsUSBDriver") as text
do shell script theComand with administrator privileges
end try
try
set strGoToTrashPath to "/Library/Extensions/SiLabsUSBDriver.kext" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try

try
set theComand to ("/usr/bin/sudo /sbin/kextunload -b SiLabsUSBDriver64") as text
do shell script theComand with administrator privileges
end try
try
set strGoToTrashPath to "/Library/Extensions/SiLabsUSBDriver64.kext" as text

set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try
set theComand to ("/usr/bin/sudo /sbin/kextunload -b \"Wacom Tablet\"") as text
do shell script theComand with administrator privileges
end try
try
set strGoToTrashPath to "/Library/Extensions/Wacom Tablet.kext" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try
try

set theComand to ("/usr/bin/sudo /sbin/kextunload -b \"Pen Tablet\"") as text
do shell script theComand with administrator privileges
end try
try
set strGoToTrashPath to "/Library/Extensions/Pen Tablet.kext" as text
set strCommandText to ("/usr/bin/osascript -e 'tell application \"Finder\" to move POSIX file \"" & strGoToTrashPath & "\" as alias to the trash'") as text
do shell script strCommandText with administrator privileges
end try

|

その他のカテゴリー

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