Probier das, es sendet auch eine Notification wenn ein Fehler auftritt
Show Plain Text
- set startupDisk to boot volume of (system info)
- set allDisks to list folder "/Volumes"
- repeat with aDisk in allDisks
- try
- if contents of aDisk is not startupDisk then do shell script "/usr/sbin/diskutil unmount " & quoted form of ("/Volumes/" & aDisk)
- on error
- display notification "The disk " & aDisk & " couldn't be unmounted" with title "Unmount Error"
- end try
- end repeat