Sorry that doesn't work for the address bar
use
Clear Typed URL MRU.vbs
This clears the addresses typed into Explorer or Internet Explorer and asks to open the History folder to delete items from the History list.
'ClearTypedURL.vbs
'Selectively clears individual items from the history for URLs typed into IE.
'
'Serenity Macros
http://www.angelfire.com/biz/serenitymacros
'David Candy (e-mail address removed)
'
On Error Resume Next
strExplain="ClearTypedURL clears individual items from the history of URLs typed into Internet Explorer." & vbCRLF & "The program will prompt for each item in the list." & vbCRLF & vbCRLF
strTitle="Clear Run MRU"
Dim Sh
Set Sh = WScript.CreateObject("WScript.Shell")
ReportErrors "Creating Shell"
Sh.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\" & Wscript.ScriptName & "\", Chr(34) & Wscript.ScriptFullName & Chr(34)
Sh.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\" & Left(Wscript.ScriptName, Len(Wscript.ScriptName)-3) & "exe" & "\", Chr(34) & Wscript.ScriptFullName & Chr(34)
ReportErrors "Updating App Paths"
NoOfURLs=0
x=1
Do
t=Sh.RegRead("HKCU\Software\Microsoft\Internet Explorer\TypedURLs\Url" & CStr(x))
If Err.Number=-2147024894 then
Err.Clear
Exit Do
Else
NoOfURLs=NoOfURLs + 1
x=x+1
End If
Loop
If MsgBox (strExplain & "Number of entries" & vbtab & NoOfURLs & vbCRLF & vbCRLF & "Continue?", vbYesNo + vbInformation, strTitle) = 6 then
Dim MRUItem()
ReDim Preserve MRUItem(0)
For x=0 to NoOfURLs - 1
MItem=Sh.RegRead("HKCU\Software\Microsoft\Internet Explorer\TypedURLs\Url" & CStr(x +1))
Sh.Regdelete "HKCU\Software\Microsoft\Internet Explorer\TypedURLs\Url" & CStr(x + 1)
If MsgBox ("Do you want to delete " & vbcrlf & vbcrlf & MItem & vbcrlf & vbcrlf & "Yes" & vbtab & "To delete" & vbcrlf & "No" & vbtab & "To keep", vbYesNo + vbQuestion, strTitle) <> 6 then
ReDim Preserve MRUItem(UBound(MRUItem)+1)
MRUItem(UBound(MRUItem))=MItem
End If
Next
If UBound(MRUItem) > 0 Then
For x=1 to UBound(MRUItem)
Sh.RegWrite "HKCU\Software\Microsoft\Internet Explorer\TypedURLs\Url" & CStr(x),MRUItem(x)
Next
End If
If MsgBox ("Visited URLs are also stored in the History folder. Each item can be deleted there." & vbcrlf & vbcrlf & "Open History folder?", vbYesNo + vbQuestion, strTitle) = 6 then
Sh.Run "Explorer /e,/root," & Sh.RegRead ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\History")
End If
End If
VisitSerenity
ReportErrors(test)
Sub ReportErrors(strModuleName)
If err.number<>0 then Msgbox "An unexpected error occurred. This dialog provides details on the error." & vbCRLF & vbCRLF & "Error Details " & vbCRLF & vbCRLF & "Script Name" & vbTab & Wscript.ScriptFullName & vbCRLF & "Module" & vbtab & vbTab & strModuleName & vbCRLF & "Error Number" & vbTab & err.number & vbCRLF & "Description" & vbTab & err.description, vbCritical + vbOKOnly, "Something unexpected"
Err.clear
End Sub
Sub VisitSerenity
If MsgBox("This program came from the Serenity Macros Web Site" & vbCRLF & vbCRLF & "Would you like to visit Serenity's Web Site now?", vbQuestion + vbYesNo + vbDefaultButton2, "Visit Serenity Macros") =6 Then
sh.Run "http:\\
www.angelfire.com\biz\serenitymacros"
End If
End Sub