?
Solved

Clear the Start- Run box with a script

Posted on 2004-09-10
3
Medium Priority
?
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
waltonob earned 375 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
The well known Cerber ransomware continues to spread this summer through spear phishing email campaigns targeting enterprises. Learn how it easily bypasses traditional defenses - and what you can do to protect your data.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 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