Permission to kill a process

J

Joe

If I'm using process.kill, I can only kill processes,
which are created in the same login session. (I'm using
win2000, I'm in the local admin group) Processes created
by me in earlier logins or even processes of other
accounts cannot be killed. I get exceptions, like "You
have no permission...".

I've tried to do the job in a console application and in a
service running under my account (which is in the local
admin group of win2000), but I have the effects described
above. (The goal is to do process cleaning as a service.)

In the TaskManager I can kill the processes, which I
cannot in vb.net. The zones "My Computer" and "Local
Intranet" are set to "Full Trust".

Any ideas where to get/set the missing permission for e.g.
kill a process by someone in the admin group?

Joe
 
O

One Handed Man

Try setting the service to the local system account rather than your named
account and allow it to interact with the desktop.

Just a thought !

Regards - OHM
 
Z

zurg

Hi!
---> Joe: Sorry, for getting into your discussion but I was looking for this
quite long...
---> OHM: Do you have any idea how to set interactivity of a service from a
program??? I really need it...
Please help...
 
O

One Handed Man

Sure. Go into the services panel in control panel, choose the service and
then set to system.

Regards OHM
 
O

One Handed Man

Actually I misunderstood your question. You mean programatically change it?.
Well, you cannot mitigate the WIN32 System security. So you would need to
start the process with a specific ID you cannot simply change it while its
running.

Regards - OHM
 
J

Joe

If it would be that easy, the console application should
have done the job without doing anything...

BTW, the service have to run under a named account because
it has also another tasks to do, which need it. But the
question isn't the service, but the killing of processes.

Joe
 
Z

zurg

Yes, I was asking how to do it programicly...
Is it possible to change the interactivity BEFORE running the service?
Mayby there is any other way?
Tell me if you know any...
I have to make service interactive but I can do it during instalaction or
later - no problem...
So if you know any way to do that just let me know...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top