I am having trouble remembering my Outlook PST
password, and cannot import that file into Outlook 2016. I have tried several forums, free password recovery software tools, but could not reset/recover the password. After browsing a lot, I found out Aspose.Email
for .NET
has a backdoor to access the properties of PST file and there's a way to reset password. I have no idea about this, and have never used .NET
or C#
. Is there someone who can help me out here?
Following are the related links from my browsing results:
Aspose.Email for .NET - https://dzone.com/articles/how-to-check-set-remove-or-update-password-of-pst
PST Password Property - https://msdn.microsoft.com/en-us/library/ff385916(v=office.12).aspx
Please note my PST is UNICODE and not ANSI format, so following is already out of question. http://www.itninja.com/blog/view/how-to-unlock-password-protected-pst-file-6
This is what I have tried online @https://dotnetfiddle.net/:
using System;
using Aspose.Email.Mapi;
using Aspose.Email.Storage.Pst;
namespace Aspose.Email.Examples.CSharp.Email.Outlook
{
class RemovingPaswordProperty
{
public static void Run()
{
// The path to the File directory.
// ExStart:RemovingPaswordProperty
string dataDir = RunExamples.GetDataDir_Outlook();
PersonalStorage personalStorage = PersonalStorage.FromFile(dataDir + "PersonalStorage1.pst");
if (personalStorage.Store.Properties.ContainsKey(MapiPropertyTag.PR_PST_PASSWORD))
{
MapiProperty property = new MapiProperty(MapiPropertyTag.PR_PST_PASSWORD, BitConverter.GetBytes((long)0));
personalStorage.Store.SetProperty(property);
}
// ExEnd:RemovingPaswordProperty
}
}
}
and I am getting following errors:
Error(s):
Compilation error (line 14, col 30): The name 'RunExamples' does not exist in the current context