使用 Apple 脚本通过包标识符的给定包名称删除应用程序
Using Apple script to remove app by given bundle name of bundle identifier
我可以通过 Info.plist 知道应用程序包名称或包标识符。
但是捆绑显示名称已经本地化,这意味着它将在每个语言环境中显示不同的应用程序名称。
我可以使用 apple 脚本通过使用特定的包名称或包标识符来删除此应用程序吗?
我试过了
tell applications "Finder"
delete file "APP BUNDLE NAME" of folder "Applications" of startup disk
end tell
结果说找不到"APP BUNDEL NAME"
由于包名称为 "AAA",但在语言环境 1 中显示名称为 "BBB",在语言环境 2 中显示名称为 "CCC"
有没有什么方法可以编写通用脚本来删除所有语言环境的应用程序?
谢谢
在 Finder
中,通过包标识符获取文件引用的说明符是 application file id
tell application "Finder"
delete application file id "com.foo.bar"
end tell
我可以通过 Info.plist 知道应用程序包名称或包标识符。 但是捆绑显示名称已经本地化,这意味着它将在每个语言环境中显示不同的应用程序名称。
我可以使用 apple 脚本通过使用特定的包名称或包标识符来删除此应用程序吗?
我试过了
tell applications "Finder"
delete file "APP BUNDLE NAME" of folder "Applications" of startup disk
end tell
结果说找不到"APP BUNDEL NAME" 由于包名称为 "AAA",但在语言环境 1 中显示名称为 "BBB",在语言环境 2 中显示名称为 "CCC"
有没有什么方法可以编写通用脚本来删除所有语言环境的应用程序?
谢谢
在 Finder
中,通过包标识符获取文件引用的说明符是 application file id
tell application "Finder"
delete application file id "com.foo.bar"
end tell