Batch File for ending program?

F

---Fitz---

My situation is that I want to create a simple batch file to kill a running
program by using the process name. I can to this in XP but can't get it to
work in Vista Home Premium. I've tried using PSKILL and TASKKILL with no
joy. My intent is to use it as a scheduled task to execute at 2:00 AM to
kill a running program that has been started by an existing batch file at
midnight. Any help is appreciated.
 
F

---Fitz---

Thanks for the quick reply. I'll be in front of the Vista machine later on
today and let you know. It works fine on my XP machine.

---Fitz---

| Dear Fitz
|
| Why not try VBScript?
|
| http://computerperformance.co.uk/vbscript/wmi_process_stop.htm
|
| Guy
|
| | > My situation is that I want to create a simple batch file to kill a
| > running
| > program by using the process name. I can to this in XP but can't get it
| > to
| > work in Vista Home Premium. I've tried using PSKILL and TASKKILL with
no
| > joy. My intent is to use it as a scheduled task to execute at 2:00 AM
to
| > kill a running program that has been started by an existing batch file
at
| > midnight. Any help is appreciated.
| >
| >
|
|
 
J

Jimmy Brush

Also,

Be aware that if the process you are attempting to kill is a system
process (not running in your current session) or is otherwise
protected, the script will need to run "as administrator" in order for
it to succeed.

This can be accomplished by executing the script from a
"run-as-administratored" command prompt, or by specifying in task
scheduler that you want the command line to run with highest
privilege.
 
F

---Fitz---

Thanks guys! Worked like a charm. I appreciate the info and the link.


| Also,
|
| Be aware that if the process you are attempting to kill is a system
| process (not running in your current session) or is otherwise
| protected, the script will need to run "as administrator" in order for
| it to succeed.
|
| This can be accomplished by executing the script from a
| "run-as-administratored" command prompt, or by specifying in task
| scheduler that you want the command line to run with highest
| privilege.
|
| --
| - JB
| Microsoft MVP - Windows Shell
|
| On Sun, 13 May 2007 10:51:30 -0400, "---Fitz---"
|
| >Thanks for the quick reply. I'll be in front of the Vista machine later
on
| >today and let you know. It works fine on my XP machine.
| >
| >---Fitz---
| >
| >| >| Dear Fitz
| >|
| >| Why not try VBScript?
| >|
| >| http://computerperformance.co.uk/vbscript/wmi_process_stop.htm
| >|
| >| Guy
| >|
| >| | >| > My situation is that I want to create a simple batch file to kill a
| >| > running
| >| > program by using the process name. I can to this in XP but can't get
it
| >| > to
| >| > work in Vista Home Premium. I've tried using PSKILL and TASKKILL
with
| >no
| >| > joy. My intent is to use it as a scheduled task to execute at 2:00
AM
| >to
| >| > kill a running program that has been started by an existing batch
file
| >at
| >| > midnight. Any help is appreciated.
| >| >
| >| >
| >|
| >|
| >
 

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