Thread: Password protected directory?

  1. #1
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765

    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?

  2. #2
    Hmm... Cool prospect. I would say No, Unless You Rewrite Windows, but there may be a way to work around it.
    Compilers:
    GCC on Red Hat 8.1 (Primary)
    GCC on Mac OS X 10.2.4 (Secondary)

    Others:
    MinGW on XP

  3. #3
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    I'd say it's possible.

    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.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  4. #4
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765
    Ok. But the thing is, I dont know **** about getting into the registry with C++

  5. #5
    I idn't know it stored it in the registry.

    I assume it is in HKEY_CLASSES_ROOT, but what is the key?

    Biosninja, there are plenty of registry tutorials out there, and a good reference for registry stuff is regedit.com (which just moved to http://www.winguides.com/registry/).

    ~Inquirer
    Compilers:
    GCC on Red Hat 8.1 (Primary)
    GCC on Mac OS X 10.2.4 (Secondary)

    Others:
    MinGW on XP

  6. #6
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765
    Thanx. I'll check that out now

  7. #7
    maybe you could do something we all know is possible, encrypt the files in the directory, you could make that proggy

  8. #8
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765
    maybe you could do something we all know is possible, encrypt the files in the directory, you could make that proggy
    Nope. I don't want to decrypt the files/directory everytime I want to access it. he directory will also be big (about a gig or more). It will take a lot of time to encrypt and decrypt it every time

  9. #9
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    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.
    hello, internet!

  10. #10
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765
    Got WinXP pro

  11. #11
    Registered User Azuth's Avatar
    Join Date
    Feb 2002
    Posts
    236
    And when someone runs a command prompt and then goes into the directory, will that be OK?
    Demonographic rhinology is not the only possible outcome, but why take the chance

  12. #12
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765
    Nope. It should then say access is denied or ask for the pasword

  13. #13
    Registered User Azuth's Avatar
    Join Date
    Feb 2002
    Posts
    236
    Well then blocking access through explorer probably isn't going to give the desired result.
    Demonographic rhinology is not the only possible outcome, but why take the chance

  14. #14
    This will be implemented internally using encryption accessed via permissions and/or password in the next Windows Desktop build

  15. #15
    The only ways i see:
    1) Encrypt some simple way and make a program that decrypts it

    2) Make a program that acts like explorer, and disable msdos prompts (PM me on how to do this)

    3) Rewrite some part of windows

    ~Inquirer
    Compilers:
    GCC on Red Hat 8.1 (Primary)
    GCC on Mac OS X 10.2.4 (Secondary)

    Others:
    MinGW on XP

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  3. Rar, Password Protected?
    By RahulDhanpat in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 02-16-2008, 06:27 PM
  4. [Q]Hide Password
    By Yuri in forum C++ Programming
    Replies: 14
    Last Post: 03-02-2006, 03:42 AM
  5. written command line password generator
    By lepricaun in forum C Programming
    Replies: 15
    Last Post: 08-17-2004, 08:42 PM