Solved

Clear the Start- Run box with a script

Posted on 2004-09-10
3
173 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now