Installing OSX applications in bulk from the command-line

痴心易碎 提交于 2019-12-11 18:19:33

问题


I want to automate the process of installing an app on a Mac. After Googling I found the Terminal command below to install the app to the target machine without prompting for a password.

sudo visudo
rajasekaranr ALL=(root) NOPASSWD: /usr/sbin/installer
sudo installer -store -pkg "/User/MyName/Downloads/Network Recording Player.pkg" -target /

How do I achieve the above command in Applescript? Or is there any better way to automate the process of installing an app on a Mac? Also pls confirm exactly to which installation path these commands are pointing? And how do I confirm whether the app is installed?

In the Terminal command, rajasekaranr is the username.

I have located one more command: this will mount the disk image and then move the app to the Application folder. Pls help to implement the same using Applescript/python/java.

hdiutil mount install_flash_player_osx.dmg
sudo cp -R "/Volumes/Flash Player 2/Flash Player 2.app" /Applications

来源:https://stackoverflow.com/questions/12312130/installing-osx-applications-in-bulk-from-the-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!