

#MAC UNMOUNT DISK FINDER DISSENTED FULL#
itemname: should be the full path of the application program that the script should run.

Get this by selecting the file, press Command-I for Get Information, and combine the "Where" string with the "Name and extension" string. diskpath: should be the full path to the disk image file on your hard disk.diskname: should be the name you see under the icon for the disk image on your desktop.Here are the explanations of the variables: It will need to be customized to run on your system, but all the changes that need to be made are in the declarations at the top. The last problem that needed solving was determining the name of the device on the fly, because the disk number of the image will be different at different times, depending on whether or not you've mounted USB or Firewire disks, etc.

I found that the script needs to unmount the disk (apparently with a "force" switch for the cleanest possible rsult) AND detach the corresponding device (disk1, etc.) in OS X's list of devices.Īnyway, with the help of many people on the forums (notably Dale Mox and jbc), I finally put together a script that seems to work perfectly, at least on my system. Under Panther (or maybe under OS X in general), it seems that it's not easy for a script to unmount a disk so cleanly that it can be mounted a second time in a way that all applications can see it. OED2 CD-ROM is the Oxford English Dictionary software, and its data needs to be on a CD-ROM or disk image, apparently. The application was a Classic app (OED2 CD-ROM), which may or may not have had something to do with it. The problem I kept having was that the script would work perfectly the first time I ran it, but the second and all later times (until a reboot), the script would mount the disk image and launch the application that uses the image - but the application would not detect the image, and ask me to mount it. By far the best was one was in a comment from Puffyn in a thread here last year, but it never quite worked on my system. This will definetely unmount the entire disk and all its related volume.A number of hints (and newsgroup postings elsewhere) have addressed the problem of creating a script that mounts a disk image, runs an application that uses data from the image, and then unmounts the image after the application quits.
#MAC UNMOUNT DISK FINDER DISSENTED PASSWORD#
