Detect password protected PST file

Started by wbrd, February 03, 2016, 11:32:13 AM

Previous topic - Next topic

wbrd

Hi
I was wondering if there is a way to programmatically check if a PST file is password protected.
Reason I am asking is that I have to migrate users' profile to a new DFS location. I want to proactively scan users' profile folders and if there are any password protected PST file I can inform the users ahead of time as to what to do before/after the migration is completed.
thanks

td

A shot in the dark but maybe attempt to enumerate contacts in the default Outlook folder or some other similar task.  If the attempt fails, you could assume the file is encrypted.   Here's  a contacts example:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/OLE~and~Outlook+Find~Contacts~in~Outlook.txt

Of course, you would need to add some error handling to trap when it fails but that shouldn't be too difficult.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade