Note that there are some explanatory texts on larger screens.

plurals
  1. POClearing the Windows "Run" dialog history without rebooting
    text
    copied!<p>I am currently working on a program to immediately clear the list of previously-run-commands which appears in the Windows <em>Start</em> -> <em>Run</em> dialog. The procedure for clearing this list by removing the <em>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU</em> key is <a href="http://support.microsoft.com/kb/142298" rel="nofollow noreferrer">well documented</a>; however, before these changes take effect, it seems to be necessary to do one of the following:</p> <ol> <li>Restart the computer</li> <li>Select <em>Start</em> -> <em>Shut down</em>, and then select <em>Cancel</em>.</li> </ol> <p>Neither of these is ideal for the task I am trying to accomplish: #1 is extremely disruptive to the user, and #2 appears to require additional user interaction.</p> <p>Does anyone know how to immediately (and programmatically) force a reload of this information without requiring any user interaction, <em>while also minimizing disruption of the user's other activities</em>? <strong>I would like for the user's Run history to be cleared out immediately after executing my program, <em>without</em> requiring any further action on their part (such as using the "Shut Down" -> "Cancel" trick in #2 above) or forcing a reboot.</strong></p> <p>Or, to approach the problem from a different angle: When clicking <em>Start</em> -> <em>Shut Down</em> -> <em>Cancel</em>, Windows Explorer reloads the RunMUI key. <strong>Is there a way to force a similar reload without having the user select <em>Shut Down</em> and then <em>Cancel</em>?</strong></p> <h2>Things I have already tried:</h2> <ul> <li>Monitoring the explorer.exe status using <a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx" rel="nofollow noreferrer">procmon</a> while selecting <em>Shutdown</em> and then <em>Cancel</em>. I see Explorer writing to the RunMRU key, but have not been able to determine what triggers this.</li> <li>Numerous Google searches along the lines of "reload runmru without reboot". Most results still recommend method #1 above, although a few suggest #2.</li> <li>Limited MSDN API examination. The <a href="http://msdn.microsoft.com/en-us/library/ms724867(VS.85).aspx" rel="nofollow noreferrer">RegFlushKey</a> call appears promising, but I haven't ever used it before, so I don't know if it will apply to registry information cached by different processes.</li> </ul> <p>Any suggestions or other information would be greatly appreciated.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload