Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2007
    Location
    Australia
    Posts
    201

    Clear Recent Documents registry

    Can someone please give me the registry key to Clear Recent Documents

    Thanks

  2. #2
    Join Date
    Aug 2003
    Posts
    2,427
    I think you'll find that it depends which MRU list you are thinking about there are some here.

  3. #3
    Join Date
    May 2006
    Posts
    5,380
    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/libr...05(VS.85).aspx

    Code:
    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);
    Open your eyes to Narcissism, Don't let her destroy your life!!

  4. #4
    Join Date
    May 2006
    Posts
    5,380
    add file to recent docs, the quotation is wrong, the correct way is

    Code:
    sFile=_SourceFolder.."\\AutoPlay\\Docs\\test.ext"
    result = DLL.CallFunction(_SystemFolder.."\\shell32.dll", "SHAddToRecentDocs", "2,\""..sFile.."\"", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    Open your eyes to Narcissism, Don't let her destroy your life!!

  5. #5
    Join Date
    Feb 2007
    Location
    Australia
    Posts
    201
    Thanks longedge for the link and

    RizlaUK Thank you very much it worked

    Code:
    result = DLL.CallFunction(_SystemFolder.."\\shell32.dll", "SHAddToRecentDocs", "2,0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);


Similar Threads

  1. Registry Questions
    By rob14 in forum Setup Factory 7.0
    Replies: 1
    Last Post: 01-23-2008, 03:36 PM
  2. HOWTO: Merge Registry Keys
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-17-2003, 09:31 AM
  3. Registry Features
    By Dwayne in forum Setup Factory 6.0
    Replies: 1
    Last Post: 02-21-2003, 03:30 AM
  4. INFO: Finding Shell Folders in the Registry
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-10-2002, 03:52 PM
  5. HOWTO: Merge REG Files with the Registry
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-23-2002, 02:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts