PC Review


Reply
Thread Tools Rate Thread

Batch File for ending program?

 
 
---Fitz---
Guest
Posts: n/a
 
      13th May 2007
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.


 
Reply With Quote
 
 
 
 
Guy Thomas
Guest
Posts: n/a
 
      13th May 2007
Dear Fitz

Why not try VBScript?

http://computerperformance.co.uk/vbs...ocess_stop.htm

Guy

"---Fitz---" <---Fitz---@INVALID.COM> wrote in message
news:%(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
---Fitz---
Guest
Posts: n/a
 
      13th May 2007
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---

"Guy Thomas" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
| Dear Fitz
|
| Why not try VBScript?
|
| http://computerperformance.co.uk/vbs...ocess_stop.htm
|
| Guy
|
| "---Fitz---" <---Fitz---@INVALID.COM> wrote in message
| news:%(E-Mail Removed)...
| > 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.
| >
| >
|
|


 
Reply With Quote
 
Jimmy Brush
Guest
Posts: n/a
 
      13th May 2007
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---"
<---Fitz---@INVALID.COM> wrote:

>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---
>
>"Guy Thomas" <(E-Mail Removed)> wrote in message
>news:%(E-Mail Removed)...
>| Dear Fitz
>|
>| Why not try VBScript?
>|
>| http://computerperformance.co.uk/vbs...ocess_stop.htm
>|
>| Guy
>|
>| "---Fitz---" <---Fitz---@INVALID.COM> wrote in message
>| news:%(E-Mail Removed)...
>| > 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.
>| >
>| >
>|
>|
>

 
Reply With Quote
 
---Fitz---
Guest
Posts: n/a
 
      14th May 2007
Thanks guys! Worked like a charm. I appreciate the info and the link.


"Jimmy Brush" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| 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---"
| <---Fitz---@INVALID.COM> wrote:
|
| >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---
| >
| >"Guy Thomas" <(E-Mail Removed)> wrote in message
| >news:%(E-Mail Removed)...
| >| Dear Fitz
| >|
| >| Why not try VBScript?
| >|
| >| http://computerperformance.co.uk/vbs...ocess_stop.htm
| >|
| >| Guy
| >|
| >| "---Fitz---" <---Fitz---@INVALID.COM> wrote in message
| >| news:%(E-Mail Removed)...
| >| > 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.
| >| >
| >| >
| >|
| >|
| >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
start a program via a batch file niknik1971 Windows XP General 4 7th Aug 2006 11:41 PM
Running a DOS Batch file from a program. UJ Microsoft Dot NET 5 31st Oct 2005 01:35 PM
Run batch file on exit of program? Greg Strong Windows XP General 5 17th May 2004 02:17 PM
running a program (or batch file) at logoff? Christopher Scott Windows XP Help 2 31st Mar 2004 08:13 PM
running a program (or batch file) at logoff? Christopher Scott Windows XP General 2 31st Mar 2004 08:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:30 AM.