We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PST/OST Questions

Hello
Simple questions:

  1. PST Password: PersonalStorage.Store.IsPasswordProtected simply will reveal if .pst has password?
    If so, what’s the code here:
    https://docs.aspose.com/email/net/working-with-pst-password-protection-properties/
    Check for Password protection: The MapiPropertyTag.PR_PST_PASSWORD value from the MapiPropertyTag class is used to check if a file is password protected…

What’s the difference, and which one to use? :frowning:

  1. Here officially says that only .pst can be password protected:
    https://support.microsoft.com/en-us/office/change-the-password-for-an-outlook-data-file-pst-a2eeefc2-aca4-49f9-9761-10e295e9fb85
    But I’ve seen some .ost password remover tools on Google, what’s going on? Did you ever encounter a password protected .ost? Technically possible?

  2. CanWrite, what’s this exactly? Just based on the file is being read-only or on some media like DVD that cannot be written to? OR; there’s some internal property which write-protect the PST?
    https://reference.aspose.com/email/net/aspose.email.storage.pst/personalstorage/canwrite/

  3. Five properties in the PersonalStorage:
    https://reference.aspose.com/email/net/aspose.email.storage.pst/personalstorage/#properties
    CanWrite/Format/IsUnicode/RootFolder/Store
    Which ones are available to both PST and OST? I think not all those five properties are available for .ost too, am I right or not?

  4. MergeWith(Stream 1 + Stream 2):
    https://reference.aspose.com/email/net/aspose.email.storage.pst/personalstorage/mergewith/
    Merge 2 different .pst from different accounts to 1 single .pst?
    You’ve got a code sample for this task?
    (can merge .ost files too?)

Thanks :slight_smile:

@australian.dev.nerds

We are working over your queries and will get back to you soon.

Thanks, as for the question 1, I mean the difference between:

PersonalStorage.Store.IsPasswordProtected

and:


// Determines whether the specified PST is password protected.

private static bool IsPasswordProtected(PersonalStorage pst)

{

// If the property exists and is nonzero, then the PST file is password protected.

if (pst.Store.Properties.Contains(MapiPropertyTag.PR_PST_PASSWORD))

{

long passwordHash = pst.Store.Properties[MapiPropertyTag.PR_PST_PASSWORD].GetLong();

return passwordHash != 0;

}

return false;

}

@australian.dev.nerds

We are getting information about your queries and will get back to you soon.

@australian.dev.nerds

We have logged a ticket to update the article as PDFNET-52784 in our issue tracking system.

Password-protected pst files can be read by Aspose.Email as normal unprotected files. Even if the password is set, it can still be read by Aspose.Email. Password removal can be useful for reading messages using Outlook

This property is used to get a value indicating whether the current PST supports writing. If its value is false, you cannot write to PST.

Yes, your understanding is correct.

Yes, you can use this method for OST and PST files.

  • You mean I can merge mixed PST and OST files to a new PST file?
  • And even merge mixed mbox and PST/OST to PST?

Finally, using the latest new version 22.10, still ALWAYS getting TRUE for these 2 properties against .OST files:
Storage.IsUnicode
Storage.Store.IsPasswordProtected

  • As already mentioned, according to Microsoft (link shared) the .ost files cannot be password protected, so no idea why IsPasswordProtected is TRUE for them?

@australian.dev.nerds

Yes, you can merge PST and OST files. If you face any issue, you can convert OST to PST and then merge. Pleas read the following article.
Read and Convert Outlook OST File

We logged this issue as EMAILNET-40820 in our issue tracking system.

@australian.dev.nerds

Please check the detail of this issue from here: