赞
踩
近日要开发一个小工作(功能简单,实现困难,考虑的细节太多...汗....), 需要运行一堆shell command, 这些shell command很多都要administrator的权限, 我们可以用AppleScript来达到目的:
do shell script "command" user name "me" password "mypassword" with administrator privileges