Originally Posted By: dkmarsh
Plus, in my experimenting (OS X 10.5.8), restoring a saved copy of com.apple.dock.plist, then running killall Dock, failed to restore the poofed application to the relaunched Dock. (Same with com.apple.dock.db.) So, if a logout/login or restart are required, that makes restoring a backed-up plist even more time-consuming.

Perhaps if the script would quit Finder (quit, not relaunch), delay/sleep for a second (or 2), write the plist, and then resurrect Finder, maybe. . .