to be clear, I like the 'Recent Items' feature. I do not want to turn it off. We integrate all of Office with a document management system (DMS), Interwoven's FileSite, and because of this integration we have had to turn off the Recent Items feature. If Recent Items are turned on, documents opened from the DMS will show up in the recent items of a Windows 7 start menu when hovering over Word (or Excel\PPT etc) in the Start Menu. However the integration doesn't work correctly so if a user were to click on one of those recent [DMS] items later on, something wouldn't work right (it won't open and check out correctly etc). In short, we've always needed to turn off Recent Items completely for a DMS integrated workstation.
Does anyone knows of a way to exclude a directory from being "captured" so to speak? Or perhaps to remove certain entries via script? When you open a DMS document, the file gets copied to local directory where it saves it locally as you work, until you close and it checks it back in to the DMS. I'd like to be able to exclude that local directory from recent items. So local files in My Docs and Desktop would show up in recent items, but not DMS opened documents.
Hope this makes sense. Environment includes Win 7 (32 & 64), AD 2008 R2, we use GPOs including GPPref's extensively, if you know of a way to script it that's great also.
I achieved the opposite (making system files, like .chm .vhd .bat .dll) visible in recent items, ie via Windows Explorer, by modifying the EditFlags - check FileTypeAttributeFlags on MSDN (search google 'EditFlags msdn')
You'll want the NoRecentDocs flag
FTA_NoRecentDocs 0x00100000 Prohibits the addition of members of this file type to the Recent Documents folder. Additionally, in Windows 7 and later, prohibits the addition of members of this file type to the automatic Recent or Frequent category of an application's Jump List. This flag does not restrict members of this file type from being added to a custom Jump List. It also places no restriction on the file type being added to the automatic Jump Lists of other applications in the case that other applications use this file type.
A quick RegSearch reveals a few EditFlags entries formatted for the flag you want, like avastvpnfile (one my AV's files) @ HKLM\SOFTWARE\Classes\avastvpnfile
REG_DWORD: 0x00010000 (65536)
Not sure if that helps (filetypes, not locations) good luck!
The real problem here is that the DMS product you are using isn't providing complete shell integration, so get them to fix it.
In the meantime, you could probably write a cleanup program, using shell APIs to monitor the recent docs, and then remove the "bad" entries.
Even fancier, you could have the program modify the recent doc entries, re-directing the user to the DMS interface for that document.
Method 1 (using your suggestion): Use a vbs that runs in the backround as part of a logon script (and stays resident) to monitor and delete unwanted items (shortcuts) from the \recent\ folder. Ther are a lot of examples on stackoverflow and serverfault of vbs, c#, or other scripts to keep folders clear.
Method 2 (a tweak of the XP method): Use tweakUI's replacement took "Ultimate Windows Tweaker" with the general guidelines from about.com
http://pcworld.about.com/magazine/1910p190id57987.htm
http://www.thewindowsclub.com/ultimate-windows-tweaker-v2-a-tweak-ui-for-windows-7-vista