From: http://ask-leo.com/how_do_i_resolve_my_problem_with_appcompattxt.html
This is another case of Windows being particularly obscure. You see (and I'll say this several times), appcompat.txt is not the problem.
Appcompat.txt is simply a reporting file used when uploading error reports to Microsoft. You've seen the message asking you if you would like to "report this error to Microsoft"? Appcompat.txt is a file that is uploaded if you say yes.
Appcompat.txt is not the problem. It contains information about the problem. Open it up in notepad, and you'll see what I mean. When you get an error message that references appcompat.txt, it'll usually give you the full path to the file. So click on Start, Run and enter:
notepad C:/DOCUME~1/username/LOCALS~1/Temp/WER7b4e.dir00/appcompat.txt
Where "C:/DOCUME~1/username/LOCALS~1/Temp/WER7b4e.dir00/appcompat.txt" is replaced with the actual information that was presented in the error message. You'll see a lot of technical information that begins with this:
<?xml version="1.0" encoding="UTF-16"?> <DATABASE>
Followed by information about the program that was running at the time an error occurred. Note: it's not meant that you understand this. It's meant for the engineers back at Microsoft to use to analyze failures and hopefully provide fixes over time. I point it out here, simply to drive home the point:
Appcompat.txt is not the problem. It contains information about the problem.
So what do you do when you get an error message that references appcompat.txt? In my opinion, a) allow windows to report the error to Microsoft, if it asks you to, and b) forget about appcompat.txt. Unless you're technical enough to understand what's inside of it, it will not help you. Focus instead on what you were doing when the problem happened. We all know that programs can crash for many, many different reasons. The problem could be due to a bug in an application, a problem with your machine, a bug in Windows, a security issue, or any number of other things. Just saying "it's appcompat.txt" tells you exactly nothing about the problem.
The steps to take then will depend on what you were doing and what applications were involved. A fix could be as simple as a configuration change, a virus scan a system file check, or as complex as a complete rebuild and reinstall of Windows. But without more information, there's simply no way to know.
As a final note I want to be clear that appcompat.txt and appcompat.exe are two completely different things. Appcompat.exe is discussed in this other article: Appcompat.exe - What is Appcompat.exe?.