Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to start a program in the background if an Active Directory User of a specific group logs on. This program should not be terminable by the user itself.

I have tried to create a Task which works great except that I have not been able to make it non-terminable, e.g. a normal user can quit the task.

Looking forward to your help!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

There are basically three different approaches to the problem of disallowing a user to terminate a program. All have drawbacks and there is no GOOD solution to your problem.

Essentially if the user has admin rights on the machine they will be able to terminate a process (they may not know how though)

  • Approach 1: Create whatever the program you are running as a service and flag it as unstoppable. (downsides, if you are using windows vista and up it will be locked in session 0 and can not interact with the users desktop, however you can still get notifications about logons and logoffs and react appropriately.)

  • Approach 2: Create a helper application that also runs and restarts the original application when terminated. Bonus points if you create your application to restart the helper application if closed. (downsides, too many to list, you are heading down the path of malware at this point.)

  • Approach 3: Create a secondary service that monitors for the process kill request and negates it. I am not going to explain any further about how to actually do this as the word rootkit comes to mind. Anti-Virus companies make good use of this trick to protect their products.

share|improve this answer
1  
Robin Hood and Friar Tuck! csd.uwo.ca/staff/magi/personal/humour/Computer_Folklore/… –  mfinni Aug 30 '11 at 19:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.