对于我的目的,我只需要通过其DOS路径了解驱动器的BitLocker加密状态。就像这样:
enum DriveEncryptionStatus{
Unprotected,
Protected,
Unknown
};
DriveEncryptionStatus = GetDriveBitlockerEncryptionStatus(L"C:\\");
我能找到Win32_EncryptableVolume类,但不幸的是,它带有以下警告:
要使用Win32_EncryptableVolume方法,必须满足以下条件:您必须拥有管理员特权。
有没有办法在不以管理员身份运行时完成此操作?
from win32com.propsys import propsys; bitlocker_status = propsys.SHGetPropertyStoreFromParsingName("C:").GetValue(propsys.PSGetPropertyKeyFromName("System.Volume.BitLockerProtection")).GetValue()
- Vynce