Click here for important information about

how to make a script to kill a process id????

November 21, 2010 at 01:08:06
Specs: Windows XP
I wanna make a script to kill a process ID till that process dies and also wanna rename the logs of the services related to that process ID and restart the service back again.your help will be highly appreciated.

See More: how to make a script to kill a process id????

November 21, 2010 at 17:28:17
David Perry's solution is here:

What exactly do you want to do? Check the process table for a PID and kill it? If so, you simply need to do a 'ps -edf' command and grep for the PID. You then kill the PID and rename your file with a 'mv' command. Then restart your process.

Perhaps if you gave the task a try and came up with a partially working solution you might get more help. As explained here, a lot of detail is missing.

Report •

November 21, 2010 at 19:24:05
Dear David,

The Scenario is like this.I have a service running in my system "CustomerInfo".I grep that string like this ps -ef |grep -i cust and i will get the PID for this and i am killing this PID the problem is that i have to kill this service frequently and i want to make this an Automated task so that once i run the scrript the following things should happen.

1.It should grep that string i.e, Customerinfo
2.After that it showld take that PID and kill it until that process completely dies.
3.and rename that service file so that if i start that service again it shouldnt be over written.
4.And the last thing i wanna start it again.

Report •
Related Solutions

Ask Question