file protection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How to protect a file with a password ,
means the file which created from my program should not be deleted
by any means in the client system,
still,if anyone tries to delete the file it should ask for a password.
 
1. You want to create a file on someone else's machine
2. You want to make sure they cannot delete that file
3. If they try to delete that file, you want them to have to give a password?

Is this correct?

1. Who owns this machine? You? or the client?

Your intentions may be good, but you should not have control over someone
else's machine. There are ways around this, of course, but programs that
employ these techniques are generally known as viruses and spyware.

If this is a network program, put in a policy that prevents deletion of the
file and replaces it if it is deleted. If it is a person who just installed
your software, give it up. If this particular file is critical to your
software, create a routine that downloads if missing or place the information
somewhere else (registry, etc.). You may have to rearchitect your solution to
get this done.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Write a windows service and keep it running all the time just by keeping this
file opened programatically in write or read(based on the requirement) Mode.
So if anyone is explicitly trying to delete this file will get a warning like
this file is used by an another program.

Sounds Cool ?!
 
Incase if you want to delete this file, you can do it by passing a custom
command code the windows service, whioch will delete this file
programatically.
 
Back
Top