Submitted By: Anonymous

Opens Outlook's Secure Temporary Files Folder in Windows Explorer.

Visual Basic
Edit|Remove
' OpenOLTemp.vbs
' 
' Opens the "Microsoft Outlook Secure Temporary Folder" in Windows Explorer
'
' Version 1.0
' 13 February 2004
'
' Usage:  Double-click on file
'
Set Sh = CreateObject("WScript.Shell")
key =  "HKEY_CURRENT_USER\"
fld = ""
found = false
for i=9 to 19 ' Good for next few versions I hope
    k = key & "Software\Microsoft\Office\" & i & ".0\Outlook\Security\OutlookSecureTempFolder"
  on error resume next
    fld = Sh.RegRead(k)
  if Err.Number = -2147024894 then 
  else
    fld = Sh.RegRead(k)
    found = true
    exit for
  end if 
  on error goto 0
next

if found then 
      dim fso
      set fso = CreateObject("Scripting.FileSystemObject")
      if fso.FolderExists(fld) Then	
        Sh.Run "explorer /e,""" & fld & """"
      Else
        Wscript.Echo "Folder specified in registry does not exist."
      End if 
Else
    WScript.Echo "Folder not found."
end if ' found