PC Review


Reply
Thread Tools Rate Thread

Killing a process

 
 
Grodon
Guest
Posts: n/a
 
      4th Oct 2004
I'm trying to set up a job to kill a running application
every night, before our database backups run. Is there a
way to do this?

Thanks in adv.
Grodon
 
Reply With Quote
 
 
 
 
Mark V
Guest
Posts: n/a
 
      4th Oct 2004
In microsoft.public.win2000.cmdprompt.admin Grodon wrote:

> I'm trying to set up a job to kill a running application
> every night, before our database backups run. Is there a
> way to do this?


MS Resource Kit, Support Tools (or possible present already): kill.exe

One 3rd-party tool: pskill.exe (www.sysinternals.com)

Don't kill Services. STOP (or pause possibly) them instead.
 
Reply With Quote
 
 
 
 
Dave Patrick
Guest
Posts: n/a
 
      4th Oct 2004
This may help. Save file as VBS
Replace 'excel.exe' for your process.
-------------------------------------
Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery ("Select " & _
"* from Win32_Process Where Name = 'excel.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Set fso = Nothing
Set objWMIService = Nothing
Set colProcessList = Nothing
-------------------------------------

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Grodon" wrote:
| I'm trying to set up a job to kill a running application
| every night, before our database backups run. Is there a
| way to do this?
|
| Thanks in adv.
| Grodon


 
Reply With Quote
 
Paul R. Sadowski [MVP]
Guest
Posts: n/a
 
      4th Oct 2004

"Grodon" <(E-Mail Removed)> wrote in message
news:2afd01c4aa1e$449f2e00$(E-Mail Removed)...
> I'm trying to set up a job to kill a running application
> every night, before our database backups run. Is there a
> way to do this?


On XP there's also taskkill (Pro) and tskill (Home) though I prefer using
WMI myself since most of my backup scripts are WSH anyway.

:: Kill running instances of Outlook
%WINDIR%\System32\taskkill.exe /F /IM OUTLOOK.EXE > nul 2>&1
:: in xp home use (tskill uses the process name not an image name)
:: %WINDIR%\System32\tskill.exe outlook > nul 2>&1


 
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
Killing a child process of NTVDM.exe without killing NTVDM.exe itself tristin.colby@gmail.com Microsoft Windows 2000 CMD Promt 1 22nd Jan 2010 07:51 PM
Killing VB softly with his song, Killing VB softly...with a song............. clintonG Microsoft VB .NET 39 25th Oct 2005 03:42 PM
Re: Killing VB softly with his song, Killing VB softly...with a song............. pH Microsoft VB .NET 2 24th Oct 2005 04:27 AM
Killing print drivers from a user's profile without killing entire profile? Jessica Nielsen Microsoft Windows 2000 Printing 1 17th Jun 2004 09:29 PM
Killing parent process does not kill child process Chris Coates Microsoft Windows 2000 0 23rd Feb 2004 08:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:27 AM.