locked
How can I clear the current users EFS certificate's private key from memory? RRS feed

  • Question

  • I am trying to remove access to EFS encrypted files on Windows XP sp3 (and all the latest updates).  I'm not sure what update changed to make my old process not work.  I used to use CAPICOM to open the "My" store, delete all the private keys and remove the certificates.  After that, I would call SetUserFileEncryptionKey(IntPtr.Zero) to clear it from memory.  After that call succeeded, the logged in user could no longer open their encrypted files.  Now, however, the SetUserEncryptionKey method returns an error code of "3221227263".  And users can continue to access the EFS files until they log out of their current session.   

    I was wondering if there was maybe an easier or more appropriate way to accomplish my task?

    Friday, October 29, 2010 11:03 PM