MacOS – Disk image windows open beneath other windows

dmgmacmacos

When I install software from a .dmg, the verification window pops up, which I suspect is normal. When it's done, though, the Finder window – you know, the "Drag to Applications to install" box – pops up under everything else. This is crazy-annoying.

After reading this other thread explaining how to craft a DMG with a script to surface the window, I now believe this is the normal behavior on Lion.

How might I "fix things" so I get a DMG to pop up without needing to reprogram each one?

Best Answer

Digging around on Apple Discussions, I found this hint for this problem:

In Terminal.app, execute (all on one line, no carriage return) (does not require sudo)

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

A successful run produces no output.

After doing that on my machine (OS X 10.8.2 12C60), the expected behavior for read-only .dmg's momentarily occurs, i.e. when opening .dmg's from Firefox or from the Downloads folder on the Dock, after accepting the license agreement (if one is present,) the Finder window for the .dmg pops to the foreground.

BUT, this desirable behavior only seems to last a matter of seconds before the old behavior (opening under other windows) recurs. Not sure what to make of it. Probably some conflict going on within LaunchServices, either an Apple bug, or maybe interference from some other application.

In my case, I have a lot of third party file-system and UI tools such as PathFinder, DefaultFolderX, KeyboardMaestroX, etc, maybe one of these is to blame.