From various threads I've cobbled together how to check for BitLocker programmatically like this:
private void TestBitLockerMenuItem_Click(object sender, RoutedEventArgs e) {
var path=new ManagementPath(@"\ROOT\CIMV2\Security\MicrosoftVolumeEncryption")
{ ClassName="Win32_EncryptableVolume" };
var scope=new ManagementScope(path);
path.Server=Environment.MachineName;
var objectSearcher=new ManagementClass(scope, path, new ObjectGetOptions());
foreach (var item in objectSearcher.GetInstances()) {
MessageBox.Show(item["DeviceID"].ToString()+" "+item["ProtectionStatus"].ToString());
}
}
But it only works if the process has admin privileges.
It seems odd that any old Windows user can go to Explorer, right-click on a drive, and find out if it has BitLocker turned, but a program cannot seem to get this done. Does anyone know of a way to do this?