Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: AppCompatCache registry Windows 7

24 Oct 2015   #1

Windows 7 Home Premium 64 bits
[SOLVED] AppCompatCache registry Windows 7 + database


I can't delete once and for all the old content of this key (HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\AppCompatCache) and I'm becoming crazy, really. The content of the key back every shutdown of Windows, with nearly the same content. My problem is that the old, very old *.exe are kept (around 8 months) in this key.
During my tests, once, all old *.exe were deleted. Once but, I don't know really how. I tried with a delete of C:\WINDOWS\AppCompat & C:\WINDOWS\AppPatch and it seems it worked. But, after another test, there was no good result.
I logged every acts from Windows when it shutdown, and I don't see what it loads to write this key everytime between the opening of the key and the closing.

Now, I have :
  • Program Compatibility Assistant is disabled in Services ;
  • Both Windows' folders above are deleted ;
  • Tasks with a link with Program Compatibility Assistant in Task Scheduler are deleted ;
  • The content of Prefetch's Folder deleted (AgRobust.db + AgAppLaunch.db (I think for this file, I don't remember) could contain a link with AppCompatCache).

I'm depressing... I need your help...

I would like to delete the old content of AppCompatCache which keeps old paths + its executable because I have them until 8 months ago... It's a security break that I don't want keep until 8 months.


rundll32.exe kernel32.dll,BaseFlushAppcompatCache
is the batch command. Then, you can schedule it for your needs. But, if you are a rigorous person, after each executable deleted or uninstalled, after the reboot of the computer when your executable is already deleted, launch this command. Because, AppCompatCache is wrote at the end of the Windows's shutdown procedure. So it's not possible to execute it efficiently for the shutdown.

Also, these both files contain old paths + executable like AppCompatCache. Delete them just after the batch command wrote above if they are present.
If you disabled services linked with Program Compatibility Assistant and Prefetch, these files need normally to be deleted once only.

My System SpecsSystem Spec
24 Oct 2015   #2
Layback Bear

Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64

AppCompatCache to the best of my knowledge is under the control of Trusted Installer and is part of Windows 7.

To me that means don't do anything with it. Leave it alone.

Than being said; have you run any security scans and if so which ones. What were the results.

Some infection might be hiding in App Compat Cache.

Why are you wanting to remove AppCompatCache?

Hopefully more will respond to your thread with more knowledge than I.
Could take some time, so just leave AppCompatCache alone until more members drop by.
My System SpecsSystem Spec
24 Oct 2015   #3

Windows 7 Home Premium 64 bits

No it's not an infection problem because all my tests are done on the main + a fresh Windows 7. The problem is this Program Compatibility Application has a "hidden part" somewhere, I'm nearly sure.

I changed a bit my first post to precise, I want have a control on the content. I can't delete this key, but I can, normally, have an impact on its content. But, I don't know how.
I want have the control on for never see my old paths of *.exe. This key is like a history.
My System SpecsSystem Spec

26 Oct 2015   #4

Windows 7 Home Premium 64 bits

I found something which is probably my last option :
But I'm not able to launch this function. It seems "#include <windows.h>" is necessary, but there is no result... It doesn't find it.
Microsoft don't help more, or I understand nothing.
My System SpecsSystem Spec
05 Nov 2015   #5

Windows 7 Home Premium 64 bits

Well. There is a way very easy to flush the cache that I know now thanks to a great person. A lot of time, for a really small command... The solution is located in my first post.
My System SpecsSystem Spec

 AppCompatCache registry Windows 7

Thread Tools

Similar help and support threads
Thread Forum
Cannot delete certain Registry Key; Cannot change Owner of Registry Ke
In order to get rid of the *.zip folder view in WinExplorer on a64bit WIn7 system I tried to delete (according to some tutorials) the Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31} Unfortuantely this is NOT possible immediately....
General Discussion
Registry: can't control Desktop Background Slideshow in registry?
Just a rough test: 1. No slideshow on desktop; 2. Backup the registry file; 3. Turn on the slideshow (Desktop - Personalize - Desktop Background - Select All - Save Changes); 4. Run the backup registry file; The desktop starts with the original picture (the desktop wallpaper picture...
Registry problem after windows update and registry optimization tool
Hello sevenforum, I've already spend some time on this forum today but I can't find the solution to a particular registry problem I'm having. While windows was uploading some updates yesterday, I cleaned my registry using Iolo's system mechanic tool and that's where the problems started. (I...
Backup and Restore
Driver Sweeper can't delete all registry files in registry editor So this is the situation: I've unistalled Amd Driver from Device Manager, Unistalled Catalyst software and ran Driver Sweeper. There is only 3 registeries that the Driver Sweeper CAN'T delete and these are under SYSTEM\ folder. I've tried to change user...

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 12:25.
Twitter Facebook Google+