Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Disabling EFS for a Specific Folder

You can disable EFS on any folder by using Windows Explorer to set the System attribute to "on." This takes advantage of the safety precaution that prevents the encryption of files that are needed for the system to start. There are some folders, however, that cannot be marked as system folders. An example is the Profiles folder, which contains Ntuser.dat files.

To disable EFS on folders that cannot be marked as system folders

  • Use the Winadvapi API, which has the following format:





IN BOOL Disable



This routine disables and enables EFS in the directory DirPath.

Arguments are:

DirPath - Directory path.

Disable - TRUE to disable (FALSE to enable)

The return value is:



The header file for this is Winefs.h. This API disables or enables EFS in the folder that is passed in. It creates a Desktop.ini file with these lines:


Disable=1; (or Disable=0)

If Desktop.ini already exists, the API adds these lines to the file. Manually adding the lines to a Desktop.ini file has the same effect.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft