Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Delphi and Windows XP most used programs list question

Posted on 2006-04-01
1
Medium Priority
?
188 Views
Last Modified: 2010-04-05
Hi All,

I need to know how I can programmatically using Delphi 7 erase Windows XP most used programs list (the list which appears just above "All Programs" when you hit the Start button.

So can someone please provide me with sample code on how to do that?

Thanks in advance
0
Comment
Question by:GiantMatrix
1 Comment
 
LVL 4

Accepted Solution

by:
AndersonCarli earned 2000 total points
ID: 16356269
The most used programs list its stored in the "UserAssist" registry Key:

Look at:
  [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\
   UserAssist\{75048700-EF1F-11D0-9888-006097DEACF9}\Count]

If you delete all that (poorly coded) string values stored under this key you'll get what you want.

try some like this:

// ***** Code Start **** //
uses registry;

procedure CleanMURP;
const
  MRUP_Key:string = 'Software\Microsoft\Windows\CurrentVersion\Explorer\'+
                    'UserAssist\{75048700-EF1F-11D0-9888-006097DEACF9}\Count';
var
  i:Integer;
  ValueNames: TStrings;
begin
  ValueNames := nil;
  with TRegistry.Create do try
    RootKey := HKEY_CURRENT_USER;
    OpenKey(MRUP_Key, False);

    ValueNames := TStringList.Create;
    GetValueNames(ValueNames);

    for i := 0 to ValueNames.Count-1 do
      DeleteValue(ValueNames[i]);

  finally
    if Assigned(ValueNames) then ValueNames.Free;
    Free;
  end;
end;
// ***** Code End **** //

PS: The Shortcuts will be gone, only after you logoff your current session.

Cheers,

Anderson
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question