View Full Version : Clear Recent Documents registry
Can someone please give me the registry key to Clear Recent Documents
Thanks:huh
longedge
11-02-2008, 03:34 AM
I think you'll find that it depends which MRU list you are thinking about there are some here (http://windowsxp.mvps.org/RegistryMRU.htm).
RizlaUK
11-02-2008, 07:14 AM
clear it with API, a call to "SHAddToRecentDocs_(2,0)" in shell32.dll with a "0" as ther last arg will clear recent docs, "SHAddToRecentDocs_(2,File)" to add a file (where "File" is the full path to the file.)
MSDN
http://msdn.microsoft.com/en-us/library/bb762105(VS.85).aspx
to clear
result = DLL.CallFunction(_SystemFolder.."\\shell32.dll", "SHAddToRecentDocs", "2,0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
to add
sFile="path\\to\\my\\file.ext"
result = DLL.CallFunction(_SystemFolder.."\\shell32.dll", "SHAddToRecentDocs", "2,'"..sFile.."'", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
RizlaUK
11-02-2008, 08:30 AM
add file to recent docs, the quotation is wrong, the correct way is
sFile=_SourceFolder.."\\AutoPlay\\Docs\\test.ext"
result = DLL.CallFunction(_SystemFolder.."\\shell32.dll", "SHAddToRecentDocs", "2,\""..sFile.."\"", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
Thanks longedge for the link and
RizlaUK Thank you very much it worked :yes
result = DLL.CallFunction(_SystemFolder.."\\shell32.dll", "SHAddToRecentDocs", "2,0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
:lol
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.