Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
1st I want to create a file which cannot be deleted.
2nd how to code an app so that user cannot end that task from task manager. or how I'll get to know that it is ending from task manager.
Posted
Updated 21-Jun-10 22:21pm
v3

Unless you are the owner of the computer you're acting on you have no right to mess up someone else computer.

What you are trying to do, especially if done suspiciously without user knowledge, is illegal.

It is not the first question you're asking in this direction ...
 
Share this answer
 
v2
Comments
pushpendrak 22-Jun-10 13:41pm    
nothing like that, i just want that, my user who is very naughty! cannot delete that log file i m writing. so i can verify later my app logs.
Emilio Garavaglia 23-Jun-10 2:58am    
You have no right to do so if the user you're working with doesn't want it.
Agree with the user, or don't provide him support.

OR ... develop the application so that log files are written with an impersonation different than the one of the logged-on user under a folder granted to that account and not to the user. (But you have to agree about the user's on that machine / domain)

OR ... log into the operating system event-log and access the log via event-viewer (But you have to agree with a computer admin)

But -in any case- don't mess up the user environment.
pushpendrak wrote:
1st i want to create a file which cannot be deleted

You need to give it (or the parent folder) appropriate rights via a windows admin account.

pushpendrak wrote:
2nd how to code an app so that user cannot end that task from task manager.

Why does this sound suspicious.
:~
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900