Windows 2003 Killing Processes Remotly

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

I am not sure if this is the right group or not, if it isn't please
let me know.

I would like to set it up so a user in our domain can kill processes
remotly on a server without being an admin on that server, is this
possible.?

Everthing I have found says you have to be an admin in order for it to
work.

Thanks

Eric
 
"Eric" <ericstauss@gmail.com> wrote in message
news:1185901381.121021.316240@z28g2000prd.googlegroups.com...
>I am not sure if this is the right group or not, if it isn't please
> let me know.
>
> I would like to set it up so a user in our domain can kill processes
> remotly on a server without being an admin on that server, is this
> possible.?
>
> Everthing I have found says you have to be an admin in order for it to
> work.
>
> Thanks
>
> Eric


This is correct: You have to be an admin in order to kill a
process. However, if you're not an admin then you can
"wave" to the admin who will then do the job for you.

Here is how you can achieve it. On the server, create
the batch file c:\Windows\UserKill.bat and put these
lines inside.

@echo off
if not exist d:\Shares\SomeUser\Tasks\KillProcess.bat goto :eof
call d:\Shares\SomeUser\Tasks\GetProcessName.bat
del d:\Shares\SomeUser\Tasks\GetProcessName.bat
TaskKill /im %ProcessName%

Now do this:
- Schedule this task to run once every five minutes.
- Give the user a shortcut that points to c:\Windows\AskUser.bat
on his own PC. Place these lines inside AskUser.bat:
@echo off
set /p name=Please enter the name of the process to be killed
if "%name%"=="" goto :eof
echo set ProcessName=%name%> \\YourServer\SomeShare\GetProcessName.bat
echo.
echo The process "%name%" will be killed within 5 minutes.
echo.
ping localhost -n 6 > nul

When the user double-clicks this shortcut, the batch file
"GetProcessName.bat" will be created on the server.
On the server the batch file c:\Windows\UserKill.bat
will run once every five minutes. It will first obtain the name
of the process to be killed from GetProcessName.bat.
Next it will kill the nominated process.

Whether it's a good idea to let users kill processes on the
server is another question . . .
 
On Jul 31, 1:41 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:
> "Eric" <ericsta...@gmail.com> wrote in message
>
> news:1185901381.121021.316240@z28g2000prd.googlegroups.com...
>
> >I am not sure if this is the right group or not, if it isn't please
> > let me know.

>
> > I would like to set it up so a user in our domain can kill processes
> > remotly on a server without being an admin on that server, is this
> > possible.?

>
> > Everthing I have found says you have to be an admin in order for it to
> > work.

>
> > Thanks

>
> > Eric

>
> This is correct: You have to be an admin in order to kill a
> process. However, if you're not an admin then you can
> "wave" to the admin who will then do the job for you.
>
> Here is how you can achieve it. On the server, create
> the batch file c:\Windows\UserKill.bat and put these
> lines inside.
>
> @echo off
> if not exist d:\Shares\SomeUser\Tasks\KillProcess.bat goto :eof
> call d:\Shares\SomeUser\Tasks\GetProcessName.bat
> del d:\Shares\SomeUser\Tasks\GetProcessName.bat
> TaskKill /im %ProcessName%
>
> Now do this:
> - Schedule this task to run once every five minutes.
> - Give the user a shortcut that points to c:\Windows\AskUser.bat
> on his own PC. Place these lines inside AskUser.bat:
> @echo off
> set /p name=Please enter the name of the process to be killed
> if "%name%"=="" goto :eof
> echo set ProcessName=%name%> \\YourServer\SomeShare\GetProcessName.bat
> echo.
> echo The process "%name%" will be killed within 5 minutes.
> echo.
> ping localhost -n 6 > nul
>
> When the user double-clicks this shortcut, the batch file
> "GetProcessName.bat" will be created on the server.
> On the server the batch file c:\Windows\UserKill.bat
> will run once every five minutes. It will first obtain the name
> of the process to be killed from GetProcessName.bat.
> Next it will kill the nominated process.
>
> Whether it's a good idea to let users kill processes on the
> server is another question . . .


Thanks much. It worked great, well aside from this line
"if not exist d:\Shares\SomeUser\Tasks\KillProcess.bat goto :eof"
Once I removed that it worked fine.

In most cases we would not let users kill processes on servers. This
is a dev server and a programmer who wants to kill processes from time
to time.

Thanks again
 
"Eric" <ericstauss@gmail.com> wrote in message
news:1185913805.237944.39000@g12g2000prg.googlegroups.com...
> On Jul 31, 1:41 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:
>> "Eric" <ericsta...@gmail.com> wrote in message
>>
>> news:1185901381.121021.316240@z28g2000prd.googlegroups.com...
>>
>> >I am not sure if this is the right group or not, if it isn't please
>> > let me know.

>>
>> > I would like to set it up so a user in our domain can kill processes
>> > remotly on a server without being an admin on that server, is this
>> > possible.?

>>
>> > Everthing I have found says you have to be an admin in order for it to
>> > work.

>>
>> > Thanks

>>
>> > Eric

>>
>> This is correct: You have to be an admin in order to kill a
>> process. However, if you're not an admin then you can
>> "wave" to the admin who will then do the job for you.
>>
>> Here is how you can achieve it. On the server, create
>> the batch file c:\Windows\UserKill.bat and put these
>> lines inside.
>>
>> @echo off
>> if not exist d:\Shares\SomeUser\Tasks\KillProcess.bat goto :eof
>> call d:\Shares\SomeUser\Tasks\GetProcessName.bat
>> del d:\Shares\SomeUser\Tasks\GetProcessName.bat
>> TaskKill /im %ProcessName%
>>
>> Now do this:
>> - Schedule this task to run once every five minutes.
>> - Give the user a shortcut that points to c:\Windows\AskUser.bat
>> on his own PC. Place these lines inside AskUser.bat:
>> @echo off
>> set /p name=Please enter the name of the process to be killed
>> if "%name%"=="" goto :eof
>> echo set ProcessName=%name%> \\YourServer\SomeShare\GetProcessName.bat
>> echo.
>> echo The process "%name%" will be killed within 5 minutes.
>> echo.
>> ping localhost -n 6 > nul
>>
>> When the user double-clicks this shortcut, the batch file
>> "GetProcessName.bat" will be created on the server.
>> On the server the batch file c:\Windows\UserKill.bat
>> will run once every five minutes. It will first obtain the name
>> of the process to be killed from GetProcessName.bat.
>> Next it will kill the nominated process.
>>
>> Whether it's a good idea to let users kill processes on the
>> server is another question . . .

>
> Thanks much. It worked great, well aside from this line
> "if not exist d:\Shares\SomeUser\Tasks\KillProcess.bat goto :eof"
> Once I removed that it worked fine.
>
> In most cases we would not let users kill processes on servers. This
> is a dev server and a programmer who wants to kill processes from time
> to time.
>
> Thanks again
>


Thanks for the feedback. The line you deleted should have read

if not exist d:\Shares\SomeUser\Tasks\GetProcessName.bat goto :eof

Its removal will cause a persistent error condition to appear
against your scheduled task.
 
On Jul 31, 3:35 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:
> "Eric" <ericsta...@gmail.com> wrote in message
>
> news:1185913805.237944.39000@g12g2000prg.googlegroups.com...
>
>
>
>
>
> > On Jul 31, 1:41 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:
> >> "Eric" <ericsta...@gmail.com> wrote in message

>
> >>news:1185901381.121021.316240@z28g2000prd.googlegroups.com...

>
> >> >I am not sure if this is the right group or not, if it isn't please
> >> > let me know.

>
> >> > I would like to set it up so a user in our domain can kill processes
> >> > remotly on a server without being an admin on that server, is this
> >> > possible.?

>
> >> > Everthing I have found says you have to be an admin in order for it to
> >> > work.

>
> >> > Thanks

>
> >> > Eric

>
> >> This is correct: You have to be an admin in order to kill a
> >> process. However, if you're not an admin then you can
> >> "wave" to the admin who will then do the job for you.

>
> >> Here is how you can achieve it. On the server, create
> >> the batch file c:\Windows\UserKill.bat and put these
> >> lines inside.

>
> >> @echo off
> >> if not exist d:\Shares\SomeUser\Tasks\KillProcess.bat goto :eof
> >> call d:\Shares\SomeUser\Tasks\GetProcessName.bat
> >> del d:\Shares\SomeUser\Tasks\GetProcessName.bat
> >> TaskKill /im %ProcessName%

>
> >> Now do this:
> >> - Schedule this task to run once every five minutes.
> >> - Give the user a shortcut that points to c:\Windows\AskUser.bat
> >> on his own PC. Place these lines inside AskUser.bat:
> >> @echo off
> >> set /p name=Please enter the name of the process to be killed
> >> if "%name%"=="" goto :eof
> >> echo set ProcessName=%name%> \\YourServer\SomeShare\GetProcessName.bat
> >> echo.
> >> echo The process "%name%" will be killed within 5 minutes.
> >> echo.
> >> ping localhost -n 6 > nul

>
> >> When the user double-clicks this shortcut, the batch file
> >> "GetProcessName.bat" will be created on the server.
> >> On the server the batch file c:\Windows\UserKill.bat
> >> will run once every five minutes. It will first obtain the name
> >> of the process to be killed from GetProcessName.bat.
> >> Next it will kill the nominated process.

>
> >> Whether it's a good idea to let users kill processes on the
> >> server is another question . . .

>
> > Thanks much. It worked great, well aside from this line
> > "if not exist d:\Shares\SomeUser\Tasks\KillProcess.bat goto :eof"
> > Once I removed that it worked fine.

>
> > In most cases we would not let users kill processes on servers. This
> > is a dev server and a programmer who wants to kill processes from time
> > to time.

>
> > Thanks again

>
> Thanks for the feedback. The line you deleted should have read
>
> if not exist d:\Shares\SomeUser\Tasks\GetProcessName.bat goto :eof
>
> Its removal will cause a persistent error condition to appear
> against your scheduled task.- Hide quoted text -
>
> - Show quoted text -


Thanks, everything is working Great
 
Back
Top