Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, if I have Excel installed and it appears in the start menu, when I hover my mouse on it the most recently used documents are displayed on the right.

They also appear when I right click the icon of an open application in the taskbar.

Where is this list of documents stored for all the applications? How can I clear it for a particular application?

share|improve this question
up vote 3 down vote accepted

Answer in this thread, I don't understand the second step "PInvoke", maybe someone could explain.

http://stackoverflow.com/questions/4678445/clean-windows-7-start-menu-mru-list

Now this is the solution for my question:

I Cleaned the values under the Registry Keys HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist{CEBFF5CD-ACE2-4F4F-9178-9926F41749EA}\Count and HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist{F4E57C4B-2036-45F0-A9AB-443BCFE33D9F}\Count

Then I executed the following PInvoke to refresh the cache of the Explorer.exe:

C#:

using System.Runtime.InteropServices;
[DllImport("shell32.dll")]
static extern void SHChangeNotify(int wEventId, int uFlags, IntPtr dwItem1, IntPtr wItem2);
private const int SHCNE_ASSOCCHANGED = 0x08000000;
private const int SHCNF_IDLIST = 0x0000;
private void ClearCache() {
    SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, IntPtr.Zero, IntPtr.Zero);
}
share|improve this answer
1  
Thanks! Looks like they have encrypted everything there in rot13 format. That's why I couldn't find the when I searched the registry! (I guess PInvoke is just an Windows API call to ask Windows to re-read the values from registry after you've tinkered with them.) – KalEl Jan 28 '11 at 4:12
    
How do you execute Pinvoke? – Moab Jan 28 '11 at 5:29
    
@KalEl: The API call is SHChangeNotify(). P/Invoke is not directly related to Windows API. Also known as Platform Invocation Services, it's just a method of calling native code (often DLL functions, including Windows API) from "managed" (.NET Runtime) code. C# is a .NET language. – grawity Jan 28 '11 at 6:37
    
use sliver.com/dotnet/snippetcompiler to do the P/Invoke. Put the "using System.Runetime.InteropServices" at the top of the code file, and the rest into the "main() {}", between the curly brackets. Then start the thing (somewhere theres a button). It should open up a commandline Window which disappears shortly after. – sinni800 Jan 28 '11 at 7:54
    
I'll do it for you non-programmers. Download this: dl.dropbox.com/u/16862782/ClearCache.cs and the SnippetCompiler (one post up) and open the .CS file in SnipperCompiler. Then hit the green "start" arrow in the toolbar. When the black window appears, just hit a button, the command has been executed. (What I said in my previous comment was garbage, it does NOT go into Main(). It goes into the class definition) – sinni800 Jan 28 '11 at 8:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .