Home > Mobile >  (VB.NET) Is There a Way to "lock" a Windows Folder and its Contents?
(VB.NET) Is There a Way to "lock" a Windows Folder and its Contents?

Time:11-07

I want to have my VB.NET program secure folder(s) which all contain a handful of different files so the files within cannot be edited unless the program "unlocks" the folder in Windows. Is this possible? I do not want the folder/files hidden just essentially in some Read-Only state or something or fake out windows into thinking they are already open. The goal is if someone opens the files without the program "unlocking" them, they cannot edit/save changes.

CodePudding user response:

Maybe this article can be useful for you:

How to password protect a folder in Windows 10

CodePudding user response:

The best solution to achieve this functionality is to create a Kernel Minifilter file system driver that prevents other apps from writing or even reading files specified by your program, however, driver development needs extensive knowledge of the system Kernel.

Filter Manager Concepts

https://learn.microsoft.com/en-us/windows-hardware/drivers/ifs/filter-manager-concepts

Processing I/O Operations

https://learn.microsoft.com/en-us/windows-hardware/drivers/ifs/processing-i-o-operations

Communication Between User Mode and Kernel Mode

https://learn.microsoft.com/en-us/windows-hardware/drivers/ifs/communication-between-user-mode-and-kernel-mode

Writing Preoperation Callback Routines

https://learn.microsoft.com/en-us/windows-hardware/drivers/ifs/writing-preoperation-callback-routines

Completing an I/O Operation in a Preoperation Callback Routine

https://learn.microsoft.com/en-us/windows-hardware/drivers/ifs/completing-an-i-o-operation-in-a-preoperation-callback-routine

  • Related