Macos 带2个SSD的apple脚本集引导卷

Macos 带2个SSD的apple脚本集引导卷,macos,applescript,osx-mavericks,boot,osx-yosemite,Macos,Applescript,Osx Mavericks,Boot,Osx Yosemite,我有一个Mac Pro和两个SSD,一个是Yosemite,一个是Mavericks。 我需要一个Applescript将引导卷从一个SSD更改为另一个SSD,并停用或激活NVIDIA驱动程序。 我找到了一个类似的脚本来更改启动卷: do shell script "bless --mount /Volumes/NAME_of_the_SSD/ --setBoot --legacy" with administrator privileges tell application "System E

我有一个Mac Pro和两个SSD,一个是Yosemite,一个是Mavericks。 我需要一个Applescript将引导卷从一个SSD更改为另一个SSD,并停用或激活NVIDIA驱动程序。 我找到了一个类似的脚本来更改启动卷:

do shell script "bless --mount /Volumes/NAME_of_the_SSD/ --setBoot --legacy" with administrator privileges
tell application "System Events" to shut down
因此,如果路径是正确的卷/名称\u SSD/

另外,我必须激活/停用NVIDIA驱动程序,但我认为这应该可以做到:

do shell script "sudo nvram boot-args="nv_disable=1"" password "xxxxxx" with administrator privileges

找到解决方案:

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

这可能不是你想要的评论,但是如果你使用虚拟机,你不会节省很多时间吗?你对虚拟机的意思是什么?你的意思是安装Windows吗?还是约塞米蒂的一个有小牛的虚拟机?为了澄清这里的一些事情,我完全是个脚本编写高手!VM也很明显。我认为建议你可以考虑在你的Mac上安装Oracle VirtualBox,然后安装Windows 7或者你想在虚拟机中玩的任何其他垃圾。这样,你就可以在Yosemite或Mavericks或任何你想要的像样的苹果操作系统中启动你的Mac,但是有一个单独的窗口,可以在不重新启动的情况下同时运行Windows。也许第一篇文章有点让人困惑,我不需要也不想让Windows参与其中。我只是需要剧本,因为我很懒。通常,如果我想从Yosemite引导到Mavericks,我必须禁用终端中的NVIDIA驱动程序,选择带有Mavericks的启动卷并重新引导。所以我想要一个这个过程的脚本,就这样。
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