Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Unmount a volume (on login) via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Unmount a volume (on login) via AppleScript
Authored by: Shane Palmer on Feb 23, '06 06:52:26PM
You can also perform the shell command without ever needing to launch Terminal by using the do shell script command so your full script would look like this:
do shell script "diskutil unmount \"/Volumes/volumename to unmount\""
Since this uses a scripting addition there is no need to have a tell block either. There are several other options with the do shell script command that will allow you to prompt for an admin username and password. To get more info on this command in Script Editor go to File-->Open Dictionary... and select Standard Additions. It is located in the Miscellaneous commands section. This will at least allow you to get it to a point where no user interaction is required and the user won't even notice anything happening other than the script icon in the dock, unless you tell it to prompt for a password.

[ Reply to This | # ]