' Liste les chemins de stockage des identités Outlook Express.
' www.faqOE.Com
' P.Gastaldi (paskal)
' MVP Microsost
option explicit
Const HKCU = &H80000001
Const READYSTATE_COMPLETE = 4
Dim strResult
Dim SubKeys,subkey,oReg,Return,strValue,strName
Dim objShell
Dim oIE
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
Set objShell=CreateObject("WScript.Shell")
Set oIE = WScript.CreateObject("InternetExplorer.Application","IE_")
With oIE
.left = 40:.top = 80:.width = 600:.height = 300:.menubar = False:.toolbar = False:.statusbar = False
End With
oIE.navigate("about:blank")
Do While Not oIE.ReadyState = READYSTATE_COMPLETE : Loop
oReg.EnumKey HKCU, "Identities", SubKeys
For Each subkey In SubKeys
strValue=objShell.RegRead ("HKEY_CURRENT_USER\Identities\" & subkey & "\Software\Microsoft\Outlook Express\5.0\Store Root")
If (Err.Number = 0) Then
oReg.GetStringValue HKCU,"Identities\" & subkey ,"Username",strName
strName= "" & strName & "
"
end if
strResult = strResult & strName & strValue & "
"
Next
oIE.Document.write("