Clean Windows 7 Start Menu MRU List

Boris picture Boris · Jan 13, 2011 · Viewed 15.5k times · Source

Is there a way to clean the most recently started applications from the Windows 7 start menu programmatically?

I'm looking for some registry entries and/or files to delete so the corresponding items in the Winodws 7 start menu are removed.

Answer

Anders picture Anders · Jan 13, 2011

SHAddToRecentDocs(SHARD_PIDL,NULL) is the documented way to clear the recent documents, not messing in the registry like surya suggests.

Since your question includes the word "applications" I'm assuming that you are actually mean the list of applications, and there is no real way to modify that programmatically since that list "belongs" to the user.

If you want to go the undocumented hacky route you can use get a IContextMenu for the specific .lnk and call the "Remove from this list" command.

On XP the start menu application usage is stored in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist{75048700-EF1F-11D0-9888-006097DEACF9} but explorer will cache those entries so you can't just delete the key without killing explorer first.