Diskimage for distribution: open a window?

Hi all!

I wrote an AppleScript to tune the setup of a disk image for distribution of an application (background image, icon view, icon positions etc.). It works well but there is a little quirk:
I have the window open in Finder and call “eject”.
So it should open the Window when the disk image is mounted again. Unfortunately this is not the case.
After the disk image is mounted only the volume icon is shown and no window does open. The rest of the setup is Ok.

I have currently no idea what’s wrong and hope for a helpful clue…

PS. I use macOS 10.14.6

Würde mich nicht wundern, wenn…

Me, I wouldn’t be surprised if macOS blocks this.

Grab a copy of DMG Canvas and relax.

I cannot use it because the whole creation process needs to be automated. Therefore I need everything in a script.

This issue has beed resolved.

The hdiutil man page states

During my tests I worked on a read-write disk image which did not open.
As soon it is read-only the window is opened after mounting the image.

DMG Canvas can be automated, it’s how it integrates with App Wrapper.

Thanks for the info. But Now I have everything working with AppleScript.