Hello everyone,
I am trying to read the Outlook 2000/XP account details from the registry
using VBScript (WSH specifically), so I can then import the information into
an asset management tool. The script below works perfectly for Outlook
Express, but for Outlook the values are stored as reg_binary, and when I run
the script I only get the binary string returned (or more often a whole
bunch of frustrating errors!!!)
In my case, the Outlook profile date is stored in:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles\Microsoft Outlook Internet
Settings\9375CFF0413111d3B88A00104B2A6676\00000006
Could someone please show me how to transform the binary string values
into a text string similar to the script below? I have spent about a week
trying all sorts of code from just about every source and none of it
works!!! From searching on the web I have noticed a lot of people trying to
do the same thing and failing, so it would be great to finally have a
solution!!
Many, many thanks in advance, and I hope you all have a nice day!
David
' *********** BEGIN CODE
' Code originally by Michelle Hillard (mhillard@craized.tv)
' Many thanks Michelle!
dim key,defaultAccount,emailAddress
Dim WSHShell
Set WSHShell = CreateObject("WScript.Shell")
on error resume next
key="HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\"
defaultAccount=WSHShell.RegRead (key & "Default Mail Account")
If err<>0 Then
MsgBox "Email Settings Not Found!"
else
emailAddress=WSHShell.RegRead (key & "Accounts\" & defaultAccount &
"\SMTP Email Address")
emailName=WSHShell.RegRead (key & "Accounts\" & defaultAccount & "\SMTP
Display Name")
pop3uname=WSHShell.RegRead (key & "Accounts\" & defaultAccount & "\POP3
User Name")
SMTPServer=WSHShell.RegRead (key & "Accounts\" & defaultAccount &
"\SMTP Server")
POP3Server=WSHShell.RegRead (key & "Accounts\" & defaultAccount &
"\POP3 Server")
'MessageText="Your Default Email Address is " & emailAddress & " (" &
emailName & ")"
'MsgBox MessageText
wscript.echo emailAddress
wscript.echo emailName
wscript.echo pop3uname
wscript.echo SMTPServer
wscript.echo POP3Server
end if
' ********* END CODE