Results 1 to 7 of 7

Thread: Passwording files

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2001
    Posts
    9

    Passwording files

    Is there anyway to password a file so it prompts for a password when double clicked? e.g if someone wants to read a .txt file with sensitive information, it will ask for a password before being opened

    Many thanks

  2. #2
    Not really, unless you...

    1. Encrypt it and have only your program be able to open it
    2. Intercept any request to open the file (useless if your program isn't running)

  3. #3
    Matthew Gates
    Guest
    Here's what you could do: Associate your program with text files. And prompt a password to open it, than once the password is correctly entered, shell to notepad and open the text file.

  4. #4
    Megatron
    Guest
    But then someone could easily associate the files to notepad again. Or they could open the files in a different application.

  5. #5
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Best just to encrypt it methinks. You can';t stop people opening stuff in other apps.

    Search www.planetsourcecode.com for encryption code, pleanty of examples.

  6. #6
    Frenzied Member Motoxpro's Avatar
    Join Date
    Sep 2001
    Location
    Spiro, OK
    Posts
    1,211
    you could create ur own text file and then code that text file to have a password dialog at the front

  7. #7
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    Here's a simple solution:

    1. Encrypt the file
    2. Put a special "header" on the file to distinguish it from other non-encrypted files
    3. Associate your program with the file, but make sure everything's the same (icons, etc.)
    4. When user double-clicks file, check for header. If header is there, then run password routine.
    5. If header isn't there, then shell the old associated program. (You can get the path of the old association when you first install).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width