Click here to Skip to main content
15,894,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have folder in my hard disk
and i want to protect this folder with password with i determine it in my code in c# (not any user's password)
so no one can enter to this folder even administrator users .
and when i run my application i would have rigth to lock or unlock this folder
please any one can help
Posted

There is no way of doing this, easily. The only way it would work, is if all the data was encrypted, and so if someone removed the process controlling access, the file system would no longer be able to read it. Another alternative is to keep your files in a password protected zip.
 
Share this answer
 
I think only way is to encrypt the folder in compressed archive with a key.
Design your application to encrypt the folder into a file and lock using a key.

You might also look into my article :
Folder protection for windows using C# & Concepts on Windows Shell menu for Folders[^]
But the technique I followed is not full proof. :cool:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900