View Single Post
  #10  
Old January 3rd 08, 11:04 AM posted to microsoft.public.outlook.general,microsoft.public.outlook
Shay Levi
external usenet poster
 
Posts: 15
Default Registry Location of Data Files



Set outlook = WScript.CreateObject("Outlook.Application")
Set ns = outlook.GetNamespace("MAPI")
MsgBox outlook.version
(...)

-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic



ah - I'll look it up then...

I guess I have a lot of experimenting to do - afaik I have ppl running
outlook 2k on some machines - I've got to find a neat way of scripting
how to look up the version and then execute the correct code...
shouldn't be *too* tough, but still. Ah well - it'll have to wait
'till after the weekend anyhow.

On Jan 2, 11:53 pm, Shay Levi wrote:

You're welcome. I had a similar question on the
microsoft.public.windows.powershell
NG. I tested the code I posted under
Outlook 2007, it might not work on outlook 2003. For 2003 try this:
Set outlook = WScript.CreateObject("Outlook.Application") Set ns =
outlook.GetNamespace("MAPI")

For Each store In ns.Folders
path = HextoAscii(store.storeid)
pos = InStr(path,":\")
If pos then WScript.Echo Mid (path,pos -1)
Next
Function HexToAscii(str)
Dim i, out
For i = 1 To Len(str) Step 2
char = Mid(str, i, 2)
If char "00" then out = out & Chr("&H" & char )
Next
HexToAscii = out
End Function
-----
Shay Levi
$cript Fanatichttp://scriptolog.blogspot.com
Hebrew weblog:http://blogs.microsoft.co.il/blogs/scriptfanatic
Thanks a lot!

I'll run some tests with that (have some pretty old configurations
out there) but it seems like you've given me pretty much all I need
to start from.

Thanks again!

Oren

On Jan 1, 7:11 pm, Shay Levi wrote:

Hi Oren,

The registry location of the files are under:
HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\Windows Messaging Subsystem\Profiles\ProfileName
But they are not readable and stored in Binary values.
This VBScript code can tell you the path to any personal storage
file
(PST,OST).
You should run it
when Outlook is open.
set outlook = createobject("outlook.application")
set ns = outlook.GetNamespace("MAPI")
For Each item In ns.stores
If item.FilePath "" Then MsgBox item.FilePath
Next
HTH
-----
Shay Levi
$cript Fanatichttp://scriptolog.blogspot.com
Hebrew weblog:http://blogs.microsoft.co.il/blogs/scriptfanatic
Hello,
I help in managing a pretty large network. As we are sadly using
pretty old computers people tend to crash\change computers pretty
often. To prevent large data loss they save important mail either
on
the exchange server or in a personal folder the .pst file of which
usually should sit on their private network folder. I have a small
scripting applet running on each computer capturing a snapshot of
the
computer status and saving it to a database on the network. I
would
like it to also add a column for the location of the outlook data
files, so that I can see which users save their .pst files locally
instead of on the network.
In order to do that I need to know how the locations of the data
files
in outlook are saved. I would suspect that it involves the
registry
somehow, which is not a problem, but what I have found seemed to
be
a
bit too user personalized. I would appreciate any help in this,
even
if it would mean that the script would have to jump from one key
to
another in order to find the required information...
Thanks a lot,
Oren



Ads
 

Credit Card - Personal Loans - Cell Phones - Bad Credit Loan - MPAA