我们正在尝试使用终端命令通过Applescript安装应用程序,如下所述。首先它将挂载dmg文件,然后将该应用程序安装到App文件夹。 虽然安装应用程序到App文件夹的其要求密码,如何使用Applescript处理此密码?苹果脚本错误
hdiutil mount /Users/rajasekaranr/Downloads/install_flash_player_osx.dmg"
sudo cp -R "/Volumes/Flash Player 2/Install Adobe Flash Player.app" /Applications
错误而使用苹果脚本执行上述命令
error "sudo: no tty present and no askpass program specified" number 1
可能重复(http://stackoverflow.com/questions/12312130 /执行终端命令编程) –