I want to quit an application before I overwrite it or its preferences. At present, I have preinstall/preupgrade simply use osascript to quit the application. This is not a good experience, as having the application save or not save its documents will be wrong some of the time; and having it ask leaves the possibility the user will cancel the quit. The better thing to do would be to stall the installation until the user quits the application. I've seen Apple Software Update installers refuse to proceed unless, for instance, iTunes has been quit; it posts an alert with the objection, and reasserts it so long as iTunes is running. I gather from Googling lists.apple.com that this is a problem with a known solution, which has been discussed extensively and optimized. This sounds better than my Braille-ing it out for myself, but I can't get that solution out of Google. Can someone please refer me to it?