Password protected directory?

This is a discussion on Password protected directory? within the C++ Programming forums, part of the General Programming Boards category; Would it be possible to write a program that protects a directory in windows so that if you click on ...

Password protected directory?

Would it be possible to write a program that protects a directory in windows so that if you click on it, it will ask for a password before you can access it? Or is there already a program on the net that can do that?

In the registry, the program used to open every file-type is stored. The program used for folders (default: explorer) is also stored there.
Perhaps you could associate your program to folders and redirect the request to explorer if the password is correct.

This feature exists in Windows NT/2000/XP as NTFS access control, but it's not very smooth to use as you describe.

win 2k+? yes, quite easy to do by hand; to do through a program shouldnt be too hard (i have very little knowledge of windoze-specific programming), but of course to run this program you would need certain user privelages already.
earlier win? no easy way.