Results 1 to 7 of 7
  1. #1
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Dallas, Texas, USA
    Posts
    1,680
    Thanks
    0
    Thanked 1 Time in 1 Post

    Batch File to clear Start | Run

    This is a bit of a follow up from a <!post=previous post,535504>previous post<!/post> but I thought that the Q & A may be worthy of it's own header...

    I have a batch file (thanks so much to John, Jefferson and others...) that I am running from the Start | Run command in Windows XP Pro. The batch file works fine. The problem I have is that the word [madison] that I type in the Run box remains. It is right there again for anyone to see who clicks on the Run command. This annoyance really defeats the overall purpose of the batch file.

    Is there a line or two that I could add to the batch file that will CLEAR the word left in the Start | Run box?
    Attached Images Attached Images
    - Ricky

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Batch File to clear Start | Run

    Ricky

    Just an idea off the top of my head.

    Could you use TweakUI and use the Paranoia tab to clear "Run History on Log On"...... <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17>I'm not sure of your OS!
    Jerry

  3. #3
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Dallas, Texas, USA
    Posts
    1,680
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Batch File to clear Start | Run

    Thanks Jerry. It's an XP Pro machine that stays running 24/7. And I do have TweakUI. But I'd still rather have the box cleared each time the batch file is run vs. having to log on / off every time. Not sure this is a possible request but it's worth a shot.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    - Ricky

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Batch File to clear Start | Run

    You might need VBScript for this, since it is stored in the registry at:

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVe rsionExplorerRunMRU

    The structure is so strange. It doesn't change the order, it changes the little sequence key.
    Attached Images Attached Images

  5. #5
    3 Star Lounger
    Join Date
    Aug 2004
    Location
    Saco, Maine, USA
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch File to clear Start | Run

    I haven't tried this script, but found it here by Googling Clear Run history.

    ClearRunHistory - Clear Windows Run history

    ' Clear the Run History
    ' Notes:
    ' 1) This routine requires the DeleteRegistryKey and CreateRegistryKey
    ' routines,
    ' you can find them in the CodeBank
    ' 2) The MRU list is kept available until Explorer is restarted
    Public Sub ClearRunHistory()
    Const HKEY_CURRENT_USER = &H80000001
    Dim sKey As String

    sKey = "SoftwareMicrosoftWindowsCurrentVersionExplorerRun MRU"
    ' delete the key that contains the path of all the files in the history
    DeleteRegistryKey HKEY_CURRENT_USER, sKey
    ' recreate the key, empty
    CreateRegistryKey HKEY_CURRENT_USER, sKey
    End Sub

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Batch File to clear Start | Run

    <P ID="edit" class=small>(Edited by jscher2000 on 17-Nov-05 19:40. )</P>Hmmm, lots of code there for something that seems as though it should be simpler. Like this, but I haven't tested it (save as nukeRunMRU.vbs and run with cscript "cath tonukeRunMRU.vbs"):

    <img src=/w3timages/censored.gif alt=censored border=0> Update: With a tweak or two it cleared the registry but not the actual Run list!

    Or... something along those lines. <img src=/S/grin.gif border=0 alt=grin width=15 height=15> but I didn't test it!!

    Added: here is the command prompt help for cscript.exe:
    <pre>Microsoft Windows Script Host Version 5.6
    Copyright Microsoft Corporation 1996-2001. All rights reserved.

    Usage: CScript scriptname.extension [option...] [arguments...]

    Options:
    //B Batch mode: Suppresses script errors and prompts from displaying
    //D Enable Active Debugging
    //E:engine Use engine for executing script
    //H:CScript Changes the default script host to CScript.exe
    //H:WScript Changes the default script host to WScript.exe (default)
    //I Interactive mode (default, opposite of //[img]/forums/images/smilies/cool.gif[/img]
    //Job:xxxx Execute a WSF job
    //Logo Display logo (default)
    //Nologo Prevent logo display: No banner will be shown at execution time
    //S Save current command line options for this user
    //T:nn Time out in seconds: Maximum time a script is permitted to run
    //X Execute script in de######
    //U Use Unicode for redirected I/O from the console</pre>


  7. #7
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch File to clear Start | Run

    I've no idea if this will help, but I've managed to clear the history from Start | Run as well as file histories from several applications by using Lavasoft's AdAware spyware removal program. ( <img src=/S/free.gif border=0 alt=free width=30 height=15> for personal use).

    As with Jerry's suggestion, it's not something that can simply be added to the batch file though <img src=/S/sorry.gif border=0 alt=sorry width=15 height=15>
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •