My wife and I are set up on a single laptop and I have our iTunes libraries stored on an external HD. I'm writing an applescript to auto eject that drive when we want to take the laptop elsewhere (we normally use iPads around the house), but I'm having trouble getting the script set up to also quit iTunes for both of our accounts when run.
Here's the basic script right now which is obviously missing the magic to quit iTunes for all logged in users:
tell the application "iTunes" to quit
tell the application "Finder"
if disk Media exists then
eject disk Media
end if
end tell
Any suggestions?