Clearing XP Past Items (Useful)

Discussion in 'Windows Desktop Systems' started by Teddy, Nov 18, 2003.

  1. Teddy

    Teddy Boogie Nights...!

    Messages:
    1,551
    Location:
    London, UK
    Use this useful little VB Script to clear all those unwanted past items that tend to stay in the 'Right Click Start Menu > Properties > Taskbar Tab > Customize area.

    Used it myself and it's safe.
     
  2. Teddy

    Teddy Boogie Nights...!

    Messages:
    1,551
    Location:
    London, UK
    In case my poor attempt at describing what it clears wasn't, er, clear, see the attached:
     
  3. Hipster Doofus

    Hipster Doofus Good grief Charlie Brown

    Messages:
    5,920
    Location:
    Melbourne Australia
    Good little find Teddy. :) :D
     
  4. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    No reboot or logoff needed?
     
  5. lechtard

    lechtard Guest

    This dose'nt work - anyone figure it out ??
     
  6. Teddy

    Teddy Boogie Nights...!

    Messages:
    1,551
    Location:
    London, UK
    Worked for me. Not reboot required.

    lechtard...you're using XP i presume? Not sure why it wouldnt work if you are.

    This is the code, perhaps you could follow it and do it manually:

    'xp_pastitems.vbs - Remove Past Items from the System Tray
    'Based on fixes by Doug Knox and Kelly Theriot.
    '© Doug Knox and Kelly Theriot - 8/23/2003

    Message = "To work correctly, the script will close" & vbCR
    Message = Message & "and restart the Windows Explorer shell." & vbCR
    Message = Message & "This will not harm your system." & vbCR & vbCR
    Message = Message & "Continue?"

    X = MsgBox(Message, vbYesNo, "Notice")

    If X = 6 Then

    On Error Resume Next

    Set WshShell = WScript.CreateObject("WScript.Shell")

    WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify\IconStreams"
    WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify\PastIconStreams"

    Set WshShell = Nothing

    On Error GoTo 0

    For Each Process in GetObject("winmgmts:"). _
    ExecQuery ("select * from Win32_Process where name='explorer.exe'")
    Process.terminate(0)
    Next

    MsgBox "Finished." & vbcr & vbcr & "© Doug Knox and Kelly Theriot", 4096, "Done"

    Else

    MsgBox "No changes were made to your system." & vbcr & vbcr & "© Doug Knox and Kelly Theriot", 4096, "User Cancelled"

    End If
     
  7. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    Ah, I see it restarts the Explorer shell in order to prevent a full reboot. I usually used to delete the keys and restart for the changes to take effect. Closing and re-opening Explorer from Task Manager should do the trick.

    @letchard:
    Try going through it manually. Open Regedit and navigate to:
    HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify\
    Then delete the two values in the right-side pane: "IconStreams" "PastIconStreams"
    Close Regedit, open up Task Manager, select explorer.exe and kill the task, then click File>New Task and type explorer.
    :)
     
  8. lechtard

    lechtard Guest

    This is what I did - basiclly,, I did it and rebooted .. I'll try it the way you mentioned and see what happens .. Thanx for the info ..
     
  9. Leevoy

    Leevoy Guest

    worked fine for me, thanks for script!