The macosxhints Rating:
[Score: 9 out of 10]
- Developer: Jonathan Nathan [Click on Preferential Treatment in left frame]
- Price: Donationware / Open source
This will generate a report showing which, if any, preference files have syntax errors. It's run as root because some preference files (such as TechTool4's) are owned by root, due to the way the apps run). The -s switch tells plutil to suppress output on successful files (those that test OK), leaving just the troublesome files in the output report. At that point, you can delete, move, or try to fix the flagged files (plutil was covered in more detail in this previous hint).
While this is handy, not everyone loves the Terminal (shocking, I know!), which is where Preferential Treatment comes in. This AppleScript Studio application wraps a nice GUI around plutil, and it lets you easily test both the user-level and system-level preference files. The output is an easy-to-read table showing the filename and a description of the problem.
Advanced users can even edit the preferences to add additional preference directories, change the script that's run, and modify the application used to edit a corrupt preference file (which you do by double-clicking any item in the output). A handy smart button reveals flagged files in the Finder, moves them to the trash, or lets you choose an app with which to open the file. There's a button to give the app admin privileges, too, so it can test those root-owned user and system-level files.
If you're handy in the Terminal, you probably won't need Preferential Treatment ... but if you'd rather have a nice GUI wrapper and an easy way to test all your XML preference files, give it a look.

