Solved

Clear the Start- Run box with a script

Posted on 2004-09-10
3
175 Views
Last Modified: 2010-04-14
Hello
 I was reading the article Q_20794666.html#9725643 about clearing your temp files with a script. Thie article was very helpful but I need one more area to clear. Is there a way to clear the Start-Run box of the files you have opened with a script?
Thanks
Dan
0
Comment
Question by:resd
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
waltonob earned 125 total points
ID: 12029181
The follow Windows script will clear the Start-Run most recently used (MRU) list.  Save this as a VBS file and run it whenever you want.  The list appears cleared after logging back in.

Dim WshShell, MRUList, x, TempChar
Set WshShell = WScript.CreateObject("WScript.Shell")

MRUList = WshShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU\MRUlist")
'wscript.echo MRUList

for x = 1 to len(MRUList)
      TempChar = mid(MRUList, x, 1)
      WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU\" & TempChar
next

WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU\MRUlist", "", "REG_SZ"
0
 
LVL 1

Author Comment

by:resd
ID: 12039984
Hello

 This script does work after logging back in. When you go through the task bar properties and clear the list, you do not have to log out. The list is cleared right then. I would like to do it like Windows does without a logout. How does Windows do it? I am using XP.
0
 
LVL 2

Expert Comment

by:waltonob
ID: 12059931
For the research I have done, all of the stated ways of clearing that MRU list is by deleting the registry values that are deleted with that script.  I agree, I have seen tools that clear the MRU without a logout/login, but I could not find a Windows API call to do that.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

808 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