|
-
Jan 12th, 2000, 10:44 AM
#1
Thread Starter
PowerPoster
Hey everyone
Is it possible to get VB to lock a txt file so that it cannot be edited by another prog (e.g. Notepad), even over a network?
Thanks for any help received.
Regards,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it 
-
Jan 12th, 2000, 12:28 PM
#2
Hyperactive Member
you can do it with DOS and shell the program from VB. just
Code:
Can'ttouchthis = Shell(attrib +R C:\pathname.txt)
I think that's right anyway.
bob
-
Jan 12th, 2000, 01:14 PM
#3
Thread Starter
PowerPoster
Thanks Bob, i will give it a shot
Regards,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it 
-
Jan 14th, 2000, 05:00 PM
#4
Conquistador
but that can still be opened
attrib +r means that the file is only read only.
that means that it can still be opened and changed by someone who knows how to use attrib, windows or microsoft word.
why don't you encrypt the file?
i have a encrypter that be incorporated into vb if you want, just email me 
------------------
david
Teenage Programmer
-
Jan 14th, 2000, 11:52 PM
#5
Thread Starter
PowerPoster
Thanks Dave but I was really after a way to lock the file, like Explorer.exe which cannot be deleted or moved or anything. The trouble with encryption is they could just delete the symbols and my security system would be ruined...
Thanks anyway,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it 
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
|