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.

Signature
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
> 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.
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 ?!

Signature
Prakash M
> 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.
Prakash M - 07 Mar 2006 19:26 GMT
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.

Signature
Prakash M
> 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.
[quoted text clipped - 7 lines]
> > by any means in the client system,
> > still,if anyone tries to delete the file it should ask for a password.