When making a disk image for software distribution, it used to be possible to make a Finder window automatically open when the disk image is mounted, using a command like
sudo bless --folder dirPath --openfolder dirPath
on a read-write disk image.
However, as of Ventura, attempting to do so produces an error message
bless: The 'openfolder' option is deprecated
and the command fails to do what I want.
Disk images that were set up this way in years past continue to work. I suppose I could duplicate a working writable disk image, remove the old contents and put in new contents, but that seems a little hacky. Is there an alternative?
which I assume is all undocumented
Oh, wow, that comment prompted me to think “Where would this documented?” and that reminded me of TN1150. And lo! it does document this stuff:
finderInfo[2]
contains the directory ID of a directory whose window should be displayed in the Finder when the volume is mounted, or zero if no directory window should be opened. In traditional Mac OS, this is the first in a linked list of windows to open; thefrOpenChain
field of the directory's Finder Info contains the next directory ID in the list. The open window list is deprecated. The Mac OS X Finder will open this directory's window, but ignores the rest of the open window list. The Mac OS X Finder does not modify this field.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"