gokul
gokul

Reputation: 305

c#.net application which can opened while opening a folder

I would like to create a c# application which will open when i open a folder automatically. My c# application is intended to be like a password system, so that the contents in the folder can only viewed after logging in to my application. Everything is ready.......... but i am confused how to open my application directly while opening the folder with a c# script? I have now created a application which will ask the user for name and password while opening the application and now i want to make it open through the folder to be locked , how to do it?

Upvotes: 0

Views: 213

Answers (2)

Dragon Creature
Dragon Creature

Reputation: 1995

Ok, first of all if you want the folder to be secure you should encrypt it otherwise all the user has to do to gain access is kill the process.

What i would recommend you do instead is create a encrypted file. For example a zip file. Then all you have to do associate the file with the program and to unpack it with the password. Then when the user is done delete it and overwrite the temporary folder. It's really important that you overwrite it otherwise the encryption is useless.

If you want to avoid conflict with other programs that work with zip files you can make your own file type it does not affect the content of the file in any way.

I hope this helps.

Upvotes: 2

GrayFox374
GrayFox374

Reputation: 1782

To make sure I understand... you want to build an application that will, when someone tries to open it, will only open after they supply a password. Hmmm... okay. A specific folder, or any folder? Local folders or folders on network shares? I initially was thinking a file system watcher approach, but that will only work on change events, like copying, renaming, deleting, etc. So that won't work. The closest would be to check last accessed time, but that is an alert ex post facto, so this must be rejected. I'm not sure how you could do this in C#. What is wrong with the robust security options MS has already established, like global groups. That provides flexible restrictions on access. Especially over large amounts of folders. Are users going to have one password per folder? Too cumbersome. One password per user? Use Windows authentication to lock it down. How is this app storing the passwords?

I recommend trying to leverage existing technology to solve problems before trying to re-invent the wheel. You have omitted the scope of this, and what you have already attempted, so we may not understand completely.

Upvotes: 1

Related Questions