Reports the path to the Internet Explorer History folder, and then lists the time periods, sites, URLs and dates visited found in that folder. For Windows NT 4.0 and Windows 98, this script requires Windows Script Host 5.1 and Internet Explorer 4.0 or later.

Visual Basic
Edit|Remove
HISTORY_LIST = 34
ITEM_NAME = 0
ITEM_DATE = 2
Set objShell = CreateObject("Shell.Application")
Set objHistory = objShell.NameSpace(HISTORY_LIST)
Set objHistoryFolder = objHistory.Self
Wscript.Echo vbCrLf & "Location of History"
Wscript.Echo objHistoryFolder.Path
For Each objPeriod In objHistory.Items
  Wscript.Echo vbCrLf & objPeriod.Name
  Wscript.Echo String(Len(objPeriod.Name), "=")
  If objPeriod.IsFolder Then
    Set objSiteFolder = objPeriod.GetFolder
    For Each objSite In objSiteFolder.Items
      Wscript.Echo vbCrLf & objSite.Name
      Wscript.Echo String(Len(objSite.Name), "-")
      If objSite.IsFolder Then
        Set objPageFolder = objSite.GetFolder
        For Each objPage In objPageFolder.Items
          strURL = objPageFolder.GetDetailsOf(objPage,ITEM_NAME)
          WScript.Echo vbCrLf & "URL: " & strURL
          strDateVisited = objPageFolder.GetDetailsOf(objPage,ITEM_DATE)
          WScript.Echo "Date Visited: " & strDateVisited
        Next
      End If
    Next
  End If 
Next