tell application "Finder" set allVolumes to the name of every disk repeat with i from 1 to the count of allVolumes if item i of allVolumes is not the name of the startup disk then -- Uncomment the 2 lines below if you don't want Network drives unmounted. -- if item i of allVolumes is not "Network" then eject (item i of allVolumes) -- end if end if end repeat end tell