Click here to Skip to main content
15,886,813 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Everyone....

I want to clear the history of RUN window ? means want to clear recent commands from RUN dialog box .

How can i do that ?

I use VS 2010 ,C# .net Framework 4.0

Thank You
Posted
Comments
ZurdoDev 15-Oct-12 9:24am    
One time? Or you want to write code to do it? It's in the registry somewhere.
Akinmade Bond 15-Oct-12 11:51am    
What have you tried?

To delete the run box history:


Go down to your start menu and right click on the start button.
A small menu will appear. Choose properties.
The taskbar and Start menu Properties will appear.
Go to the Start Menu tab .
Remove the tick next to Store and display a list of recently opened programs.
Press Apply and then OK.

hope that helps.
 
Share this answer
 
In order to do this by code, you need first to know where these values are stored. Ambesha has provided this in his answer. They are in the registry in this key: HKEY_CURRENT_USER>Software>Microsoft>Windows>CurrentVersion>Explorer>RunMRU
To change these values from C#: Read, write and delete from registry with C#[^]
 
Share this answer
 
Freind, try this and implement the same in your code if required:
Delete Specific Items:
Go to Start --> Run --> Type "regedit" in the Run dialog box.
When in the registry, browse to the following key:
HKEY_CURRENT_USER>Software>Microsoft>Windows>CurrentVersion>Explorer>RunMRU.
Delete the desired entry(ies) by right-clicking, and selecting "delete", or just highlight it and press the delete key. Click Yes to confirm. Double click the MRUList value and remove the letter(s) that you deleted from the list. Click OK. Close Registry Editor. You may need to restart your computer for the changes to take effect.

Disable History:
Go to Start --> Run --> Type "regedit" in the Run dialog box.
When in the registry, browse to the following key:
HKEY_CURRENT_USER>Software>Microsoft>Windows>CurrentVersion>Explorer>RunMRU.
Right-click the key RunMRU and choose "Permissions...".
Click "Add...".
Type "Everyone" and hit OK in the box that pops up.
Back in the Permissions (Security) dialog, choose Everyone then deny Read access.
Click OK.
Close Registry Editor. You may need to restart your computer for the changes to take effect.

Thanks,
Ambesha
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900