Redemption (RDO) - Suppress missing PST prompt (Full Version)

All Forums >> [Scripting Technologies] >> VB Script



Message


vivanov -> Redemption (RDO) - Suppress missing PST prompt (6/22/2008 6:43:49 PM)

I am writing a script to move psts from one share to another. I am using Redemption to enumerate all PST stores in mail 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 how to suppress that prompt and continue with the code? This script is intended to be deployed unattended, so can't have a gui pop-up.

Piece of 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.




mseely -> RE: Redemption (RDO) - Suppress missing PST prompt (6/23/2008 6:23:06 PM)

I haven't worked with Redemption before, so  I don't know if Redemption itself allows a prompt to be suppressed.
But, by using the Scripting.FileSystemObject in conjunction with the Redemption.RDOSession object, should be able to tell if File Exists.  If it does, move the file, otherwise skip it.

Set ofso = Createobject("Scripting.FileSystemObject")
Set Session = CreateObject("Redemption.RDOSession")
Session.Logon
For Each Store in Session.Stores
  If (Store.StoreKind = 2) or (Store.StoreKind = 1) Then
      if ofso.FileExists(Store.PstPath) Then 
          ' I think this PSTPath is what is being looked for.  Did a quick websearch against the Redemption class, and PSTPath looks like correct property
          'my code - and it prompts here
      Else
          ' PST was not found ... so don't do anything.
      End If
  End If
Next





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.21875