Startvolumen ändern mit einem Script?

elbkopp

elbkopp

Aktives Mitglied
Thread Starter
Dabei seit
19.03.2004
Beiträge
101
Reaktionspunkte
1
Ich hätte gerne ein Script, das auf dem Schreibtisch liegt, mit von einem anderen Startvolume gestartet wird, sobald ich es anklicke.
Geht so etwas, und wenn ja, hat jemand von euch so etwas schon vorgefertigt?

Danke.
 
Ich grab das ding mal aus.

Ich habe einmal high sierra und mojave auf zwei partitionen. will auf dem schreibtisch ne app zum switchen.

habe mal für bootcamp den unteren befehl benutzt, funktioniert dafür aber nicht obwohl die partitions nummern die selben sind.

do shell script "bless --setBoot --legacy --legacydrivehint /dev/disk3 --device /dev/disk0" with administrator privileges

tell application "System Events" to restart

im anhang seht ihr das bild von den festplatten: eine schimpft sich mac ssd die andere Neu


was ist falsch?
 

Anhänge

  • Bildschirmfoto 2019-10-04 um 19.58.08.png
    Bildschirmfoto 2019-10-04 um 19.58.08.png
    11,5 KB · Aufrufe: 82
ich hab das so:
do shell script "bless -mount /Volumes/BOOTCAMP -setBoot -nextonly -legacy" password "geheim" with administrator privileges
 
hab ein kleines Script gebastelt, bootet nur das nächste mal das ausgewählte Volume, ganz praktisch für GPUs ohne Bootscreen

Code:
set the_list to every paragraph of (do shell script "ls /Volumes")


set the_volume to choose from list the_list

if the_volume is in {"Bootcamp", "Windows"} then
    set legacy to "-legacy"
else
    set legacy to ""
end if




do shell script "bless -mount /Volumes/" & the_volume & " -setBoot -nextonly " & legacy password "x" with administrator privileges

tell application "Finder" to restart
 
  • Love
Reaktionen: ivan089
Anmerkung: Rootless (csrutil disable in Recovery oder System Installer) muss aus sein um in das NVRam zu schreiben.
 
Sollte die Windows Installation nicht Windows oder Bootcamp heißen dann entsprechend anpassen.
 
  • Love
Reaktionen: ivan089
jup funktioniert wunderbar. Vielen dank
 
Zurück
Oben Unten