Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redemption - Suppress PST Prompt

Status
Not open for further replies.

sergeys

MIS
May 22, 2007
55
0
0
US
I am writing a script to move psts from one share to another. I am using Redemption to enumerate all PST stores in MAPI profile, disconnect them, move them to another location, and then connect them back with new path. Problem starts when a mapping to a pst store exists in mail profile, but actual pst is missing. It pops up some gui prompts that ask to select a different path to the pst. Does anybody know of how to suppress that prompt and continue with the code?

Set Session = CreateObject("Redemption.RDOSession")
Session.Logon
For Each Store in Session.Stores
If (Store.StoreKind = 2) or (Store.StoreKind = 1) Then
'my code - and it prompts here
End If
Next

Any help is greatly appreciated. Thanks.
 
This issue has been resolved. I contacted the author of Redemption and found out that MAPI will not prompt when just querying for the pst path. It prompts because I am trying to query StoreKind. I changed the code to not query for store type, but to determine if the store is a Personal Store by presence of PstPath. Now it does not prompt me anymore:

Set Session = CreateObject("Redemption.RDOSession")
Session.Logon
For Each Store in Session.Stores
If len(trim(cstr(store.pstpath))) = 0 then
if err.number <> 0 Then Err.Clear
'not a pst
Else
'pst - Do stuff with pst
End If
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top