我有一台配备2块SSD的Mac Pro(一台配有Yosemite,一台配有Mavericks)。 我需要一个Applescript来将Boot-Volume从一个SSD更改为另一个SSD,并停用或激活NVIDIA-Driver。 我发现了一个类似于更改Boot-Volume的脚本:
do shell script "bless --mount /Volumes/NAME_of_the_SSD/ --setBoot --legacy" with administrator privileges
tell application "System Events" to shut down
所以作为脚本中的一个总noob如果路径是正确的话,我不会回避(Volumes / Name_of_the_SSD /)
其他我必须激活/停用NVIDIA-Driver,但我认为应该这样做:
do shell script "sudo nvram boot-args="nv_disable=1"" password "xxxxxx" with administrator privileges
或
do shell script "sudo nvram boot-args="nvda_drv=1"" password "xxxxxx" with administrator privileges
答案 0 :(得分:0)
找到解决方案:
do shell script "sudo systemsetup -setstartupdisk /Volumes/Name_of_the_SSD" password "xxxxxxx" with administrator privileges
do shell script "sudo nvram boot-args=\"nv_disable=1\"" password "xxxxxxx" with administrator privileges
tell application "System Events" to restart