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