|
-
Oct 20th, 2001, 03:43 PM
#1
Thread Starter
New Member
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
-
Oct 20th, 2001, 03:45 PM
#2
Member
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)
-
Oct 20th, 2001, 03:46 PM
#3
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.
-
Oct 20th, 2001, 03:58 PM
#4
But then someone could easily associate the files to notepad again. Or they could open the files in a different application.
-
Oct 20th, 2001, 04:01 PM
#5
PowerPoster
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.
-
Oct 20th, 2001, 04:23 PM
#6
Frenzied Member
you could create ur own text file and then code that text file to have a password dialog at the front
-
Oct 20th, 2001, 06:57 PM
#7
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|