简体   繁体   中英

how to create password to folder using c#

how to create password to windows folder using c#

shall I set password to folders when it is created.

You can't set a password on a folder in either FAT32 or NTFS, however you can set up so that only certain user accounts can access it using the DirectorySecurity class. There's some sample code in that link.

Something like this cannot be done using C#. The only real reliable way of achieving something like this is to write a kernal-mode File System Filter Driver . If you install the WDK there is an example called minispy Minifilter Sample which would be a good starting point for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM