Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!
Is there a possibility to protect a directory from anybody in Windows??
I'm using WPF. The program save some files in a direcrory. I hide it but thats no real solution cause in the explorer I can view the directory and the files!
Can i somehow protect the directory?
Thanks
Posted
Comments
Sayan Bera 9-May-14 12:06pm    
You can use 3rd party zip libraries, zip it with password. Or you can get some idea from this link http://www.codegain.com/articles/csharp/miscellaneous/folder-protection-for-windows-using-c-sharp.aspx.
try this -> http://www.codeproject.com/Questions/712147/Create-folder-with-password-protection

1 solution

The only options I am familiar with are permissions on the folder which any admin can change.

If it is sensitive data you should encrypt the files instead. That's the best way to make sure your data is kept safe. Or even encrypt the data into a SQL database.
 
Share this answer
 
Comments
José Amílcar Casimiro 9-May-14 12:17pm    
5+! Good solution.
Member 10497425 9-May-14 13:57pm    
How can I encrypt the Data into a SQL database?
ZurdoDev 9-May-14 13:59pm    
I would recommend writing the encryption code in C# and then writing the encrypted values to the db. There are plenty of example online if you just search for C# encryption.

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