Function Reference


_WinAPI_EncryptionDisable

Disables or enables encryption of the specified directory and the files in it

#include <WinAPIFiles.au3>
_WinAPI_EncryptionDisable ( $sDir, $bDisable )

Parameters

$sDir The name of the directory for which to enable or disable encryption.
If this parameter specifies a file, the attempt will fail.
$bDisable Specifies whether to disable or enable encryption, valid values:
    True - Disable.
    False - Enable.

Return Value

Success: True.
Failure: False, call _WinAPI_GetLastError() to get extended error information

Remarks

If encryption is disabled, the function will write the following to the Desktop.ini file in the directory (creating it if necessary):

[Encryption]
Disable=1

The user can also manually add or edit the above lines in the Desktop.ini file and produce the same effect.
Thereafter, _WinAPI_EncryptFile() function will fail on the directory and the files in it, and the last error code will be ERROR_DIR_EFS_DISALLOWED (6010).
This function does not affect encryption of subdirectories within the given directory.

If encryption is enabled, the function will write the following to the Desktop.ini file:

[Encryption]
Disable=0

Related

_WinAPI_EncryptFile

See Also

Search EncryptionDisable in MSDN Library.