0

I am working on the project to lock/unlock an USB drive using BitLocker. Its all about an Windows Form application created in C#. The problem that I faced with is that lock/unlock device only works when I start visual studio in admin mode, otherwise I am getting exception that access is denied (even to retrieve the info whether USB drive is protected or not with BitLocker). Is it somehow possible to use BitLocker within Windows Form application without admin privileges?

Any advice is gladly accepted. PP

ProgrammingLlama
  • 36,677
  • 7
  • 67
  • 86
  • Does the answer to [Detect BitLocker programmatically from c# without admin](https://stackoverflow.com/q/41308245/1115360) give you somewhere to start from? – Andrew Morton Nov 28 '21 at 12:33
  • Hi Andrew, thank you for your prompt reply. I checked this topic and it is useful only if you want to detect whether the drive is protected or not. Main main problem is to perform lock/unlock actions without admin privileges. – Petar Petrovic Nov 28 '21 at 13:03
  • Per this question and answers, apparently you can't programmatically (c#, powershell...) lock or unlock drive without proper permissions - https://superuser.com/a/1128354/416084 – nighthawk Nov 28 '21 at 17:09
  • Hi @nighthawk, That is what I was afraid of. Could you propose me any other way how can I programmatically limit access to the USB so the user will not have the access to open USB drive in explorer? I would like to avoid solutions to hide USB devices in explorer by modifying the registry values because every user can open the "regedit" and set the value to show hidden devices. – Petar Petrovic Nov 28 '21 at 17:38

0 Answers0