Solved

Clear the Start- Run box with a script

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

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…
Multi-threading long-running processes can have a significant increase in overall performance and drastically decrease over time it takes for a process to complete. Unfortunately, not all applications support native multi-threading, some by design a…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

705 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