.Bat file to kill processes upon confirmation
Posted: 24 Feb 2009 11:33
Hi all,
I'd would like some help creating a simple (yeah i know n00b here) .Bat file that kills processes but requires me to confirm i wish for this to be done.
The background:
We have several programs at work that are memory hungry when left open for some time (i have the program left open for months at a time) The program takes a while to load and validate so i tend never to close and restart. Basically i would like to create a .Bat file that kills the process when i enter the letter 'Y' and press enter. This way i would be able to add this to scheduled tasks for my breaks and if i am going on my break on time i could say yes and leave it to do the rest.
I have managed to manually kill a process on a home PC my example follows
taskkill /im iPodService.exe /f
However i do not understand the choice command.
Is this even possible?
Any help or guidance is much appreciated!
Steve
I'd would like some help creating a simple (yeah i know n00b here) .Bat file that kills processes but requires me to confirm i wish for this to be done.
The background:
We have several programs at work that are memory hungry when left open for some time (i have the program left open for months at a time) The program takes a while to load and validate so i tend never to close and restart. Basically i would like to create a .Bat file that kills the process when i enter the letter 'Y' and press enter. This way i would be able to add this to scheduled tasks for my breaks and if i am going on my break on time i could say yes and leave it to do the rest.
I have managed to manually kill a process on a home PC my example follows
taskkill /im iPodService.exe /f
However i do not understand the choice command.
Is this even possible?
Any help or guidance is much appreciated!
Steve