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!
***************************