It works good thx alot Jacques!
but one problem left.
I have to unmount to volumes!
try
do shell script "diskutil unmount /Volumes/'OSX Music'/" user name "theAdmin" password "password" with administrator privileges
do shell script "diskutil unmount /Volumes/'Backup os2'/" user name "theAdmin" password "password" with administrator privileges
end try
I made a script Application out of that to run it automaticaly on boot.
applescript only unmount the first volume ‘OSX Music’.
I have to run, by hand, the script two times to eject both volumes.
if I split it into to seperate Script App. it makes no matter! only the first script e.g. the first volume is unmounted!
Any idears out there?
try
do shell script "diskutil unmount /Volumes/'OSX Music'/; diskutil unmount /Volumes/'Backup os2'/" user name "theAdmin" password "password" with administrator privileges
end try
do shell script "diskutil unmount /Volumes/OSX\ Music/" user name "ImTheAdminUser" password "thisIsMyPassword" with administrator privileges
… but it dosent worked!
AppleScript Apllication crashed …when I try to run the script!
any other idears?
Could it be that the diskutil needs some time to run ONE command?so maybe i could INSERT an IDLE time between the two commands?
It is possible to insert idle time?
The last script you posted didin´t worked.
but it i tried the delay command with the shell script.
try
do shell script "diskutil unmount /Volumes/'OSX Music'/" user name "Admin" password "password" with administrator privileges
delay 2
end try
try
do shell script "diskutil unmount /Volumes/'Backup os2'/" user name "Admin" password "password" with administrator privileges
end try
…and it works!
thx alot. I googled a long time for a soulution. The members of MacScripter are the best!
greetz to all …