Hey,
I'm working on a Windows Service application and i want this service to be 'unable to terminate' process, so when i go to the Windows Task Manager and i click on terminate on the process, its sais unable to terminate.
Thanks,
Dan
Printable View
Hey,
I'm working on a Windows Service application and i want this service to be 'unable to terminate' process, so when i go to the Windows Task Manager and i click on terminate on the process, its sais unable to terminate.
Thanks,
Dan
Check out this article:
http://msdn.microsoft.com/en-us/libr...(v=VS.80).aspx
This is what i need, but i dont understand where to use it and how?
Try this.
If it doesn't work, you'll have to load the service under a different account ( maybe 'LocalSystem'? ).Code:public partial class MyService : ServiceBase
{
public MyService ()
{
InitializeComponent();
CanStop = false;
CanShutdown = false;
}
}
Ok, it acctually work but it doesn't exectly what i ment.
Now i cant stop the service from the Services window in Windows, but i can still do CTRL+ALT+DELETE go to Process and kill it ...
any ideas?
See my previous comment:
To determine which account, identify a service that you know you can't kill with task manager, open it up in the services control applet and see which startup account is used for that service (and use the same for that service).Quote:
If it doesn't work, you'll have to load the service under a different account ( maybe 'LocalSystem'? ).
My service is on the SYSTEM, and the process i cant close is on the 'owner' thats the user im logged with...
When im trying to close the process i cant close its sais "Unable to Terminate Process The operation could not be completed. Access is denied"