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
:
| 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