DisableAutoUnlock method of the Win32_EncryptableVolume class
The DisableAutoUnlock method of the Win32_EncryptableVolume class removes the external key saved onto the currently running operating system volume so that a data volume is not automatically unlocked when it is mounted, such as when removable memory devices are connected to the computer.
If automatic unlocking is disabled or suspended, the methods UnlockWithExternalKey or UnlockWithNumericalPassword must be used to unlock the volume.
Syntax
uint32 DisableAutoUnlock();
Parameters
This method has no parameters.
Return value
Type: uint32
This method returns one of the following codes or another error code if it fails.
Return code/value | Description |
---|---|
|
The method was successful. |
|
Automatic unlocking on the volume is disabled. |
|
BitLocker is not enabled on the volume. Add a key protector to enable BitLocker. |
|
The method cannot be run for the currently running operating system volume. |
Remarks
If no errors are returned, this method removes from the registry any volume protector IDs and external keys used to automatically unlock the volume.
Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Windows SDK. They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista Enterprise, Windows Vista Ultimate [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Namespace |
Root\CIMV2\Security\MicrosoftVolumeEncryption |
MOF |
|
See also