• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Ejecting An Image Disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ejecting An Image Disk


  • Subject: Re: Ejecting An Image Disk
  • From: Luther Fuller <email@hidden>
  • Date: Wed, 29 Oct 2008 21:01:35 -0500

On Oct 29, 2008, at 6:35 PM, Axel Luttgens wrote:
Le 28 oct. 08 à 21:51, Luther Fuller a écrit :

I have found a fix for the problem, but not yet an explanation.

Modify the ejectImageDisk handler like this ...

on ejectImageDisk(mountPoint)
	tell application "Finder"
		do shell script "hdiutil detach " & mountPoint & " -force"
	end tell
end ejectImageDisk ----------------------------

I now get instant ejection. Every time. But why do I need to tell Finder?
I've never had to enclose 'do shell script ...' in any kind of tell block.
Something strange is happening here that needs explaining.

Hello Luther,

I haven't yet tried anything wrt your precise problem here.
Before going further, could you provide us with some more info about the context? I mean, for example, why not just eject the mounted disk(s) either manually or with the help of an eject command targeted to the Finder?

I may eventually want to send an eject command to the Finder, but that wouldn't explain the behavior of hdiutil. I also tried 'hdiutil detach <mountpoint>' via Terminal and it worked perfectly with no delay.


The context, for the present, is simply to investigate some uncooperative behaviors of hdiutil. In particular, the command

	do shell script "hdiutil imageinfo " & imagePath

will not return the desired info if the image disk is mounted or the disk image is encrypted. And the command

do shell script "echo -n '' | hdiutil imageinfo -stdinpass " & imagePath

will correctly error if the disk image is encrypted, but it will also (incorrectly) error if the image disk is mounted.
I can think of no good reason why the meta-data for a disk image file should not always be available. (Perhaps someone else knows a good reason.) 'hdiutil imageinfo' simply appears to me to be buggy.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Ejecting An Image Disk (From: Luther Fuller <email@hidden>)
 >Re: Ejecting An Image Disk (From: Luther Fuller <email@hidden>)
 >Re: Ejecting An Image Disk (From: Luther Fuller <email@hidden>)
 >Re: Ejecting An Image Disk (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: AppleScript strings fail
  • Next by Date: Re: Ejecting An Image Disk
  • Previous by thread: Re: Ejecting An Image Disk
  • Next by thread: Re: Ejecting An Image Disk
  • Index(es):
    • Date
    • Thread