how to create password to folder using c#

为君一笑 提交于 2019-12-20 01:59:16

问题


how to create password to windows folder using c#

shall I set password to folders when it is created.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4428402/how-to-create-password-to-folder-using-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!